diff --git a/src/aks-preview/azext_aks_preview/__init__.py b/src/aks-preview/azext_aks_preview/__init__.py index 1f8e4dffc7a..589f29c61d8 100644 --- a/src/aks-preview/azext_aks_preview/__init__.py +++ b/src/aks-preview/azext_aks_preview/__init__.py @@ -5,7 +5,7 @@ from azure.cli.core import AzCommandsLoader -from azure.cli.core.profiles import register_resource_type +from azure.cli.core.profiles import register_resource_type, SDKProfile # pylint: disable=unused-import import azext_aks_preview._help @@ -16,7 +16,11 @@ class ContainerServiceCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - register_resource_type('latest', CUSTOM_MGMT_AKS_PREVIEW, '2021-05-01') + register_resource_type( + "latest", + CUSTOM_MGMT_AKS_PREVIEW, + SDKProfile("2021-05-01", {"container_services": "2017-07-01"}), + ) acs_custom = CliCommandType(operations_tmpl='azext_aks_preview.custom#{}') super(ContainerServiceCommandsLoader, self).__init__(cli_ctx=cli_ctx, diff --git a/src/aks-preview/azext_aks_preview/_client_factory.py b/src/aks-preview/azext_aks_preview/_client_factory.py index 9444d72256c..4cce88ec7c6 100644 --- a/src/aks-preview/azext_aks_preview/_client_factory.py +++ b/src/aks-preview/azext_aks_preview/_client_factory.py @@ -12,8 +12,6 @@ CUSTOM_MGMT_AKS_PREVIEW = CustomResourceType('azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks', 'ContainerServiceClient') -CUSTOM_MGMT_AKS = CustomResourceType('azext_aks_preview.vendored_sdks.azure_mgmt_aks', - 'ContainerServiceClient') def cf_storage(cli_ctx, subscription_id=None): diff --git a/src/aks-preview/azext_aks_preview/_loadbalancer.py b/src/aks-preview/azext_aks_preview/_loadbalancer.py index 51fd014e6f2..1bcdde48e72 100644 --- a/src/aks-preview/azext_aks_preview/_loadbalancer.py +++ b/src/aks-preview/azext_aks_preview/_loadbalancer.py @@ -58,16 +58,20 @@ def configure_load_balancer_profile(managed_outbound_ip_count, outbound_ips, out outbound_ip_prefix_resources = _get_load_balancer_outbound_ip_prefixes(outbound_ip_prefixes) if managed_outbound_ip_count or outbound_ip_resources or outbound_ip_prefix_resources: - profile.managed_outbound_ips = None - profile.outbound_ips = None + # ips -> i_ps due to track 2 naming issue + profile.managed_outbound_i_ps = None + # ips -> i_ps due to track 2 naming issue + profile.outbound_i_ps = None profile.outbound_ip_prefixes = None if managed_outbound_ip_count: - profile.managed_outbound_ips = ManagedClusterLoadBalancerProfileManagedOutboundIPs( + # ips -> i_ps due to track 2 naming issue + profile.managed_outbound_i_ps = ManagedClusterLoadBalancerProfileManagedOutboundIPs( count=managed_outbound_ip_count ) if outbound_ip_resources: - profile.outbound_ips = ManagedClusterLoadBalancerProfileOutboundIPs( - public_ips=outbound_ip_resources + # ips -> i_ps due to track 2 naming issue + profile.outbound_i_ps = ManagedClusterLoadBalancerProfileOutboundIPs( + public_i_ps=outbound_ip_resources ) if outbound_ip_prefix_resources: profile.outbound_ip_prefixes = ManagedClusterLoadBalancerProfileOutboundIPPrefixes( diff --git a/src/aks-preview/azext_aks_preview/commands.py b/src/aks-preview/azext_aks_preview/commands.py index 03ab1069e77..a8e31f01ce2 100644 --- a/src/aks-preview/azext_aks_preview/commands.py +++ b/src/aks-preview/azext_aks_preview/commands.py @@ -24,12 +24,14 @@ def load_command_table(self, _): managed_clusters_sdk = CliCommandType( operations_tmpl='azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.' 'operations._managed_clusters_operations#ManagedClustersOperations.{}', + operation_group='managed_clusters', client_factory=cf_managed_clusters ) container_services_sdk = CliCommandType( operations_tmpl='azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.' 'operations.container_service_operations#ContainerServicesOperations.{}', + operation_group='container_services', client_factory=cf_container_services ) @@ -67,8 +69,8 @@ def load_command_table(self, _): confirmation='Kubernetes will be unavailable during certificate rotation process.\n' + 'Are you sure you want to perform this operation?') g.wait_command('wait') - g.command('stop', 'stop', supports_no_wait=True) - g.command('start', 'start', supports_no_wait=True) + g.command('stop', 'begin_stop', supports_no_wait=True) + g.command('start', 'begin_start', supports_no_wait=True) g.custom_command('get-os-options', 'aks_get_os_options') # AKS container service commands diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 6b2b27d7621..54cb66218f3 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -73,7 +73,7 @@ ManagedClusterIdentity, ManagedClusterAPIServerAccessProfile, ManagedClusterSKU, - ManagedClusterIdentityUserAssignedIdentitiesValue, + Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties, ManagedClusterAutoUpgradeProfile, KubeletConfig, LinuxOSConfig, @@ -83,7 +83,7 @@ ManagedClusterPodIdentityException, UserAssignedIdentity, RunCommandRequest, - ManagedClusterPropertiesIdentityProfileValue) + ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties) from ._client_factory import cf_resource_groups from ._client_factory import get_auth_management_client from ._client_factory import get_graph_rbac_management_client @@ -1293,7 +1293,8 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to aad_profile = ManagedClusterAADProfile( managed=True, enable_azure_rbac=enable_azure_rbac, - admin_group_object_ids=_parse_comma_separated_list( + # ids -> i_ds due to track 2 naming issue + admin_group_object_i_ds=_parse_comma_separated_list( aad_admin_group_object_ids), tenant_id=aad_tenant_id ) @@ -1334,7 +1335,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to ) elif enable_managed_identity and assign_identity: user_assigned_identity = { - assign_identity: ManagedClusterIdentityUserAssignedIdentitiesValue() + assign_identity: Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties() } identity = ManagedClusterIdentity( type="UserAssigned", @@ -1347,7 +1348,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to raise CLIError('--assign-kubelet-identity can only be specified when --assign-identity is specified') kubelet_identity = _get_user_assigned_identity(cmd.cli_ctx, assign_kubelet_identity) identity_profile = { - 'kubeletidentity': ManagedClusterPropertiesIdentityProfileValue( + 'kubeletidentity': ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties( resource_id=assign_kubelet_identity, client_id=kubelet_identity.client_id, object_id=kubelet_identity.principal_id @@ -1733,7 +1734,8 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, if aad_tenant_id is not None: instance.aad_profile.tenant_id = aad_tenant_id if aad_admin_group_object_ids is not None: - instance.aad_profile.admin_group_object_ids = _parse_comma_separated_list( + # ids -> i_ds due to track 2 naming issue + instance.aad_profile.admin_group_object_i_ds = _parse_comma_separated_list( aad_admin_group_object_ids) if enable_azure_rbac and disable_azure_rbac: raise CLIError( @@ -1807,7 +1809,7 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, ) elif goal_identity_type == "userassigned": user_assigned_identity = { - assign_identity: ManagedClusterIdentityUserAssignedIdentitiesValue() + assign_identity: Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties() } instance.identity = ManagedClusterIdentity( type="UserAssigned", @@ -2171,7 +2173,7 @@ def aks_scale(cmd, # pylint: disable=unused-argument # null out the SP and AAD profile because otherwise validation complains instance.service_principal_profile = None instance.aad_profile = None - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, name, instance) raise CLIError('The nodepool "{}" was not found.'.format(nodepool_name)) @@ -2263,7 +2265,7 @@ def aks_upgrade(cmd, # pylint: disable=unused-argument, too-many-return-state headers = get_aks_custom_headers(aks_custom_headers) - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, name, instance, custom_headers=headers) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, name, instance, headers=headers) def aks_runcommand(cmd, client, resource_group_name, name, command_string="", command_files=None): @@ -2280,8 +2282,8 @@ def aks_runcommand(cmd, client, resource_group_name, name, command_string="", co request_payload.cluster_token = _get_dataplane_aad_token( cmd.cli_ctx, "6dae42f8-4368-4678-94ff-3960e28e3630") - commandResultFuture = client.run_command( - resource_group_name, name, request_payload, long_running_operation_timeout=5, retry_total=0) + commandResultFuture = client.begin_run_command( + resource_group_name, name, request_payload, polling_interval=5, retry_total=0) return _print_command_result(cmd.cli_ctx, commandResultFuture.result(300)) @@ -2376,7 +2378,7 @@ def _get_dataplane_aad_token(cli_ctx, serverAppId): def _upgrade_single_nodepool_image_version(no_wait, client, resource_group_name, cluster_name, nodepool_name): - return sdk_no_wait(no_wait, client.upgrade_node_image_version, resource_group_name, cluster_name, nodepool_name) + return sdk_no_wait(no_wait, client.begin_upgrade_node_image_version, resource_group_name, cluster_name, nodepool_name) def _handle_addons_args(cmd, # pylint: disable=too-many-statements @@ -3098,7 +3100,7 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local agent_pool.linux_os_config = _get_linux_os_config(linux_os_config) headers = get_aks_custom_headers(aks_custom_headers) - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, nodepool_name, agent_pool, custom_headers=headers) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, nodepool_name, agent_pool, headers=headers) def aks_agentpool_scale(cmd, # pylint: disable=unused-argument @@ -3116,7 +3118,7 @@ def aks_agentpool_scale(cmd, # pylint: disable=unused-argument raise CLIError( "The new node count is the same as the current node count.") instance.count = new_node_count # pylint: disable=no-member - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, nodepool_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, nodepool_name, instance) def aks_agentpool_upgrade(cmd, # pylint: disable=unused-argument @@ -3148,7 +3150,7 @@ def aks_agentpool_upgrade(cmd, # pylint: disable=unused-argument if max_surge: instance.upgrade_settings.max_surge = max_surge - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, nodepool_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, nodepool_name, instance) def aks_agentpool_get_upgrade_profile(cmd, # pylint: disable=unused-argument @@ -3230,7 +3232,7 @@ def aks_agentpool_update(cmd, # pylint: disable=unused-argument if mode is not None: instance.mode = mode - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, nodepool_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, nodepool_name, instance) def aks_agentpool_delete(cmd, # pylint: disable=unused-argument @@ -3250,7 +3252,7 @@ def aks_agentpool_delete(cmd, # pylint: disable=unused-argument raise CLIError("Node pool {} doesnt exist, " "use 'aks nodepool list' to get current node pool list".format(nodepool_name)) - return sdk_no_wait(no_wait, client.delete, resource_group_name, cluster_name, nodepool_name) + return sdk_no_wait(no_wait, client.begin_delete, resource_group_name, cluster_name, nodepool_name) def aks_disable_addons(cmd, client, resource_group_name, name, addons, no_wait=False): @@ -3269,7 +3271,7 @@ def aks_disable_addons(cmd, client, resource_group_name, name, addons, no_wait=F ) # send the managed cluster representation to update the addon profiles - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, name, instance) def aks_enable_addons(cmd, client, resource_group_name, name, addons, workspace_resource_id=None, @@ -3300,7 +3302,7 @@ def aks_enable_addons(cmd, client, resource_group_name, name, addons, workspace_ if need_post_creation_role_assignment: # adding a wait here since we rely on the result for role assignment result = LongRunningOperation(cmd.cli_ctx)( - client.create_or_update(resource_group_name, name, instance)) + client.begin_create_or_update(resource_group_name, name, instance)) cloud_name = cmd.cli_ctx.cloud.name # mdm metrics supported only in Azure Public cloud so add the role assignment only in this cloud if monitoring and cloud_name.lower() == 'azurecloud': @@ -3325,13 +3327,13 @@ def aks_enable_addons(cmd, client, resource_group_name, name, addons, workspace_ # we don't need to handle it in client side in this case. else: - result = sdk_no_wait(no_wait, client.create_or_update, + result = sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, name, instance) return result def aks_rotate_certs(cmd, client, resource_group_name, name, no_wait=True): # pylint: disable=unused-argument - return sdk_no_wait(no_wait, client.rotate_cluster_certificates, resource_group_name, name) + return sdk_no_wait(no_wait, client.begin_rotate_cluster_certificates, resource_group_name, name) def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements @@ -3797,11 +3799,11 @@ def _put_managed_cluster_ensuring_permission( need_grant_vnet_permission_to_cluster_identity) if need_post_creation_role_assignment: # adding a wait here since we rely on the result for role assignment - cluster = LongRunningOperation(cmd.cli_ctx)(client.create_or_update( + cluster = LongRunningOperation(cmd.cli_ctx)(client.begin_create_or_update( resource_group_name=resource_group_name, resource_name=name, parameters=managed_cluster, - custom_headers=headers)) + headers=headers)) cloud_name = cmd.cli_ctx.cloud.name # add cluster spn/msi Monitoring Metrics Publisher role assignment to publish metrics to MDM # mdm metrics is supported only in azure public cloud, so add the role assignment only in this cloud @@ -3840,11 +3842,11 @@ def _put_managed_cluster_ensuring_permission( acr_name_or_id=attach_acr, subscription_id=subscription_id) else: - cluster = sdk_no_wait(no_wait, client.create_or_update, + cluster = sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name=resource_group_name, resource_name=name, parameters=managed_cluster, - custom_headers=headers) + headers=headers) return cluster @@ -4083,7 +4085,7 @@ def aks_pod_identity_add(cmd, client, resource_group_name, cluster_name, ) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance) def aks_pod_identity_delete(cmd, client, resource_group_name, cluster_name, @@ -4107,7 +4109,7 @@ def aks_pod_identity_delete(cmd, client, resource_group_name, cluster_name, ) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance) def aks_pod_identity_list(cmd, client, resource_group_name, cluster_name): # pylint: disable=unused-argument @@ -4134,7 +4136,7 @@ def aks_pod_identity_exception_add(cmd, client, resource_group_name, cluster_nam ) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance) def aks_pod_identity_exception_delete(cmd, client, resource_group_name, cluster_name, @@ -4157,7 +4159,7 @@ def aks_pod_identity_exception_delete(cmd, client, resource_group_name, cluster_ ) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance) def aks_pod_identity_exception_update(cmd, client, resource_group_name, cluster_name, @@ -4188,7 +4190,7 @@ def aks_pod_identity_exception_update(cmd, client, resource_group_name, cluster_ ) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance) def aks_pod_identity_exception_list(cmd, client, resource_group_name, cluster_name): 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 6ad219a811a..cfb7db0831d 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 @@ -62,7 +62,7 @@ def test_aks_create_and_update_with_managed_aad(self, resource_group, resource_g self.check('provisioningState', 'Succeeded'), self.check('aadProfile.managed', True), self.check( - 'aadProfile.adminGroupObjectIds[0]', '00000000-0000-0000-0000-000000000001') + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000001') ]) update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ @@ -72,7 +72,7 @@ def test_aks_create_and_update_with_managed_aad(self, resource_group, resource_g self.check('provisioningState', 'Succeeded'), self.check('aadProfile.managed', True), self.check( - 'aadProfile.adminGroupObjectIds[0]', '00000000-0000-0000-0000-000000000002'), + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000002'), self.check('aadProfile.tenantId', '00000000-0000-0000-0000-000000000003') ]) @@ -114,7 +114,7 @@ def test_aks_create_aadv1_and_update_with_managed_aad(self, resource_group, reso self.check('provisioningState', 'Succeeded'), self.check('aadProfile.managed', True), self.check( - 'aadProfile.adminGroupObjectIds[0]', '00000000-0000-0000-0000-000000000003'), + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000003'), self.check('aadProfile.tenantId', '00000000-0000-0000-0000-000000000004') ]) @@ -146,7 +146,7 @@ def test_aks_create_nonaad_and_update_with_managed_aad(self, resource_group, res self.check('provisioningState', 'Succeeded'), self.check('aadProfile.managed', True), self.check( - 'aadProfile.adminGroupObjectIds[0]', '00000000-0000-0000-0000-000000000001'), + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000001'), self.check('aadProfile.tenantId', '00000000-0000-0000-0000-000000000002') ]) @@ -169,7 +169,7 @@ def test_aks_create_and_update_with_managed_aad_enable_azure_rbac(self, resource self.check('provisioningState', 'Succeeded'), self.check('aadProfile.managed', True), self.check( - 'aadProfile.adminGroupObjectIds[0]', '00000000-0000-0000-0000-000000000001') + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000001') ]) update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ @@ -1286,10 +1286,11 @@ def test_aks_create_fqdn_subdomain(self, resource_group, resource_group_location 'name': aks_name, 'identity_name': identity_name, 'subdomain_name': subdomain_name, + 'location': resource_group_location }) # create private dns zone - create_private_dns_zone = 'network private-dns zone create --resource-group={resource_group} --name="privatelink.westus2.azmk8s.io"' + create_private_dns_zone = 'network private-dns zone create --resource-group={resource_group} --name="privatelink.{location}.azmk8s.io"' zone = self.cmd(create_private_dns_zone, checks=[ self.check('provisioningState', 'Succeeded') ]).get_output_in_json() diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py b/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py index 8c5932cf8ca..9850a3923e0 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py @@ -21,10 +21,12 @@ def test_configure_load_balancer_profile(self): idle_timeout = 3600 profile = ManagedClusterLoadBalancerProfile() - profile.managed_outbound_ips = ManagedClusterLoadBalancerProfileManagedOutboundIPs( + # ips -> i_ps due to track 2 naming issue + profile.managed_outbound_i_ps = ManagedClusterLoadBalancerProfileManagedOutboundIPs( count=2 ) - profile.outbound_ips = ManagedClusterLoadBalancerProfileOutboundIPs( + # ips -> i_ps due to track 2 naming issue + profile.outbound_i_ps = ManagedClusterLoadBalancerProfileOutboundIPs( public_ips="public_ips" ) profile.outbound_ip_prefixes = ManagedClusterLoadBalancerProfileOutboundIPPrefixes( @@ -33,8 +35,10 @@ def test_configure_load_balancer_profile(self): p = loadbalancer.configure_load_balancer_profile(managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, outbound_ports, idle_timeout, profile) - self.assertIsNotNone(p.managed_outbound_ips) - self.assertIsNone(p.outbound_ips) + # ips -> i_ps due to track 2 naming issue + self.assertIsNotNone(p.managed_outbound_i_ps) + # ips -> i_ps due to track 2 naming issue + self.assertIsNone(p.outbound_i_ps) self.assertIsNone(p.outbound_ip_prefixes) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/container_service_client.py deleted file mode 100644 index 5ff9597bf7a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/container_service_client.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -# from azext_aks_preview.vendored_sdks.msrest.service_client import SDKClient -# from azext_aks_preview.vendored_sdks.msrest import Serializer, Deserializer -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.container_services_operations import ContainerServicesOperations -from .operations.operations import Operations -from .operations.managed_clusters_operations import ManagedClustersOperations -from . import models - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar container_services: ContainerServices operations - :vartype container_services: azure.mgmt.containerservice.operations.ContainerServicesOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.operations.ManagedClustersOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - 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.container_services = ContainerServicesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/__init__.py deleted file mode 100644 index f188b0d88cf..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/__init__.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from .resource_py3 import Resource - from .container_service_custom_profile_py3 import ContainerServiceCustomProfile - from .key_vault_secret_ref_py3 import KeyVaultSecretRef - from .container_service_service_principal_profile_py3 import ContainerServiceServicePrincipalProfile - from .container_service_orchestrator_profile_py3 import ContainerServiceOrchestratorProfile - from .container_service_master_profile_py3 import ContainerServiceMasterProfile - from .container_service_agent_pool_profile_py3 import ContainerServiceAgentPoolProfile - from .container_service_windows_profile_py3 import ContainerServiceWindowsProfile - from .container_service_ssh_public_key_py3 import ContainerServiceSshPublicKey - from .container_service_ssh_configuration_py3 import ContainerServiceSshConfiguration - from .container_service_linux_profile_py3 import ContainerServiceLinuxProfile - from .container_service_vm_diagnostics_py3 import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile_py3 import ContainerServiceDiagnosticsProfile - from .container_service_py3 import ContainerService - from .operation_value_py3 import OperationValue - from .tags_object_py3 import TagsObject - from .managed_cluster_service_principal_profile_py3 import ManagedClusterServicePrincipalProfile - from .managed_cluster_agent_pool_profile_py3 import ManagedClusterAgentPoolProfile - from .container_service_network_profile_py3 import ContainerServiceNetworkProfile - from .managed_cluster_addon_profile_py3 import ManagedClusterAddonProfile - from .managed_cluster_aad_profile_py3 import ManagedClusterAADProfile - from .managed_cluster_py3 import ManagedCluster - from .orchestrator_profile_py3 import OrchestratorProfile - from .managed_cluster_access_profile_py3 import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile_py3 import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile_py3 import ManagedClusterUpgradeProfile - from .credential_result_py3 import CredentialResult - from .credential_results_py3 import CredentialResults - from .orchestrator_version_profile_py3 import OrchestratorVersionProfile - from .orchestrator_version_profile_list_result_py3 import OrchestratorVersionProfileListResult -except (SyntaxError, ImportError): - from .resource import Resource - from .container_service_custom_profile import ContainerServiceCustomProfile - from .key_vault_secret_ref import KeyVaultSecretRef - from .container_service_service_principal_profile import ContainerServiceServicePrincipalProfile - from .container_service_orchestrator_profile import ContainerServiceOrchestratorProfile - from .container_service_master_profile import ContainerServiceMasterProfile - from .container_service_agent_pool_profile import ContainerServiceAgentPoolProfile - from .container_service_windows_profile import ContainerServiceWindowsProfile - from .container_service_ssh_public_key import ContainerServiceSshPublicKey - from .container_service_ssh_configuration import ContainerServiceSshConfiguration - from .container_service_linux_profile import ContainerServiceLinuxProfile - from .container_service_vm_diagnostics import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile import ContainerServiceDiagnosticsProfile - from .container_service import ContainerService - from .operation_value import OperationValue - from .tags_object import TagsObject - from .managed_cluster_service_principal_profile import ManagedClusterServicePrincipalProfile - from .managed_cluster_agent_pool_profile import ManagedClusterAgentPoolProfile - from .container_service_network_profile import ContainerServiceNetworkProfile - from .managed_cluster_addon_profile import ManagedClusterAddonProfile - from .managed_cluster_aad_profile import ManagedClusterAADProfile - from .managed_cluster import ManagedCluster - from .orchestrator_profile import OrchestratorProfile - from .managed_cluster_access_profile import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile import ManagedClusterUpgradeProfile - from .credential_result import CredentialResult - from .credential_results import CredentialResults - from .orchestrator_version_profile import OrchestratorVersionProfile - from .orchestrator_version_profile_list_result import OrchestratorVersionProfileListResult -from .container_service_paged import ContainerServicePaged -from .operation_value_paged import OperationValuePaged -from .managed_cluster_paged import ManagedClusterPaged -from .container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - ContainerServiceOrchestratorTypes, - OSType, - NetworkPlugin, - NetworkPolicy, -) - -__all__ = [ - 'Resource', - 'ContainerServiceCustomProfile', - 'KeyVaultSecretRef', - 'ContainerServiceServicePrincipalProfile', - 'ContainerServiceOrchestratorProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceAgentPoolProfile', - 'ContainerServiceWindowsProfile', - 'ContainerServiceSshPublicKey', - 'ContainerServiceSshConfiguration', - 'ContainerServiceLinuxProfile', - 'ContainerServiceVMDiagnostics', - 'ContainerServiceDiagnosticsProfile', - 'ContainerService', - 'OperationValue', - 'TagsObject', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterAgentPoolProfile', - 'ContainerServiceNetworkProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAADProfile', - 'ManagedCluster', - 'OrchestratorProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterUpgradeProfile', - 'CredentialResult', - 'CredentialResults', - 'OrchestratorVersionProfile', - 'OrchestratorVersionProfileListResult', - 'ContainerServicePaged', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'ContainerServiceOrchestratorTypes', - 'OSType', - 'NetworkPlugin', - 'NetworkPolicy', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service.py deleted file mode 100644 index ffc12f82ffb..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ContainerService(Resource): - """Container service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param orchestrator_profile: Required. Profile for the container service - orchestrator. - :type orchestrator_profile: - ~azure.mgmt.containerservice.models.ContainerServiceOrchestratorProfile - :param custom_profile: Properties to configure a custom container service - cluster. - :type custom_profile: - ~azure.mgmt.containerservice.models.ContainerServiceCustomProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. Exact one of - secret or keyVaultSecretRef need to be specified. - :type service_principal_profile: - ~azure.mgmt.containerservice.models.ContainerServiceServicePrincipalProfile - :param master_profile: Required. Profile for the container service master. - :type master_profile: - ~azure.mgmt.containerservice.models.ContainerServiceMasterProfile - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.models.ContainerServiceAgentPoolProfile] - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.models.ContainerServiceWindowsProfile - :param linux_profile: Required. Profile for Linux VMs in the container - service cluster. - :type linux_profile: - ~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile - :param diagnostics_profile: Profile for diagnostics in the container - service cluster. - :type diagnostics_profile: - ~azure.mgmt.containerservice.models.ContainerServiceDiagnosticsProfile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'orchestrator_profile': {'required': True}, - 'master_profile': {'required': True}, - 'linux_profile': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'orchestrator_profile': {'key': 'properties.orchestratorProfile', 'type': 'ContainerServiceOrchestratorProfile'}, - 'custom_profile': {'key': 'properties.customProfile', 'type': 'ContainerServiceCustomProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServiceServicePrincipalProfile'}, - 'master_profile': {'key': 'properties.masterProfile', 'type': 'ContainerServiceMasterProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ContainerServiceAgentPoolProfile]'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ContainerServiceWindowsProfile'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'ContainerServiceDiagnosticsProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerService, self).__init__(**kwargs) - self.provisioning_state = None - self.orchestrator_profile = kwargs.get('orchestrator_profile', None) - self.custom_profile = kwargs.get('custom_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.master_profile = kwargs.get('master_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_agent_pool_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_agent_pool_profile.py deleted file mode 100644 index e0d5dd777aa..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_agent_pool_profile.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceAgentPoolProfile(Model): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 1 to 100 (inclusive). The default value is - 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param dns_prefix: DNS prefix to be used to create the FQDN for the agent - pool. - :type dns_prefix: str - :ivar fqdn: FDQN for the agent pool. - :vartype fqdn: str - :param ports: Ports number array used to expose on this agent pool. The - default opened ports are different based on your choice of orchestrator. - :type ports: list[int] - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or ~azure.mgmt.containerservice.models.OSType - """ - - _validation = { - 'name': {'required': True}, - 'count': {'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[int]'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.ports = kwargs.get('ports', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.os_type = kwargs.get('os_type', "Linux") diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_agent_pool_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_agent_pool_profile_py3.py deleted file mode 100644 index dcb5bd830a9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_agent_pool_profile_py3.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceAgentPoolProfile(Model): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 1 to 100 (inclusive). The default value is - 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param dns_prefix: DNS prefix to be used to create the FQDN for the agent - pool. - :type dns_prefix: str - :ivar fqdn: FDQN for the agent pool. - :vartype fqdn: str - :param ports: Ports number array used to expose on this agent pool. The - default opened ports are different based on your choice of orchestrator. - :type ports: list[int] - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or ~azure.mgmt.containerservice.models.OSType - """ - - _validation = { - 'name': {'required': True}, - 'count': {'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[int]'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, dns_prefix: str=None, ports=None, storage_profile=None, vnet_subnet_id: str=None, os_type="Linux", **kwargs) -> None: - super(ContainerServiceAgentPoolProfile, self).__init__(**kwargs) - self.name = name - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.dns_prefix = dns_prefix - self.fqdn = None - self.ports = ports - self.storage_profile = storage_profile - self.vnet_subnet_id = vnet_subnet_id - self.os_type = os_type diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_client_enums.py deleted file mode 100644 index 4fe56768c57..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_client_enums.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class ContainerServiceOrchestratorTypes(str, Enum): - - kubernetes = "Kubernetes" - swarm = "Swarm" - dcos = "DCOS" - docker_ce = "DockerCE" - custom = "Custom" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_custom_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_custom_profile.py deleted file mode 100644 index 99a65ee2505..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_custom_profile.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceCustomProfile(Model): - """Properties to configure a custom container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator: Required. The name of the custom orchestrator to use. - :type orchestrator: str - """ - - _validation = { - 'orchestrator': {'required': True}, - } - - _attribute_map = { - 'orchestrator': {'key': 'orchestrator', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceCustomProfile, self).__init__(**kwargs) - self.orchestrator = kwargs.get('orchestrator', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_custom_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_custom_profile_py3.py deleted file mode 100644 index de010d977de..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_custom_profile_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceCustomProfile(Model): - """Properties to configure a custom container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator: Required. The name of the custom orchestrator to use. - :type orchestrator: str - """ - - _validation = { - 'orchestrator': {'required': True}, - } - - _attribute_map = { - 'orchestrator': {'key': 'orchestrator', 'type': 'str'}, - } - - def __init__(self, *, orchestrator: str, **kwargs) -> None: - super(ContainerServiceCustomProfile, self).__init__(**kwargs) - self.orchestrator = orchestrator diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_diagnostics_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_diagnostics_profile.py deleted file mode 100644 index 8cee39284dc..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_diagnostics_profile.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_diagnostics_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_diagnostics_profile_py3.py deleted file mode 100644 index e444694e8a9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_diagnostics_profile_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_linux_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_linux_profile.py deleted file mode 100644 index 4ae1aa042b5..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_linux_profile.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_linux_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_linux_profile_py3.py deleted file mode 100644 index 9756107e1c7..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_linux_profile_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_master_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_master_profile.py deleted file mode 100644 index 07a8ce1266e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_master_profile.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FDQN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_master_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_master_profile_py3.py deleted file mode 100644 index 15457f5e44d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_master_profile_py3.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FDQN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_network_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_network_profile.py deleted file mode 100644 index 45d3bb48aec..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_network_profile.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico' - :type network_policy: str or - ~azure.mgmt.containerservice.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_network_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_network_profile_py3.py deleted file mode 100644 index ec728075a04..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_network_profile_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico' - :type network_policy: str or - ~azure.mgmt.containerservice.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_orchestrator_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_orchestrator_profile.py deleted file mode 100644 index 8f1edad11b9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_orchestrator_profile.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceOrchestratorProfile(Model): - """Profile for the container service orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. The orchestrator to use to manage - container service cluster resources. Valid values are Kubernetes, Swarm, - DCOS, DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', - 'DCOS', 'DockerCE', 'Custom' - :type orchestrator_type: str or - ~azure.mgmt.containerservice.models.ContainerServiceOrchestratorTypes - :param orchestrator_version: The version of the orchestrator to use. You - can specify the major.minor.patch part of the actual version.For example, - you can specify version as "1.6.11". - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceOrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = kwargs.get('orchestrator_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_orchestrator_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_orchestrator_profile_py3.py deleted file mode 100644 index 54d8bc6aa86..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_orchestrator_profile_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceOrchestratorProfile(Model): - """Profile for the container service orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. The orchestrator to use to manage - container service cluster resources. Valid values are Kubernetes, Swarm, - DCOS, DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', - 'DCOS', 'DockerCE', 'Custom' - :type orchestrator_type: str or - ~azure.mgmt.containerservice.models.ContainerServiceOrchestratorTypes - :param orchestrator_version: The version of the orchestrator to use. You - can specify the major.minor.patch part of the actual version.For example, - you can specify version as "1.6.11". - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, *, orchestrator_type, orchestrator_version: str=None, **kwargs) -> None: - super(ContainerServiceOrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_paged.py deleted file mode 100644 index 10e9c757927..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ContainerServicePaged(Paged): - """ - A paging container for iterating over a list of :class:`ContainerService ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ContainerService]'} - } - - def __init__(self, *args, **kwargs): - - super(ContainerServicePaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_py3.py deleted file mode 100644 index ddec4057c76..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_py3.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ContainerService(Resource): - """Container service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param orchestrator_profile: Required. Profile for the container service - orchestrator. - :type orchestrator_profile: - ~azure.mgmt.containerservice.models.ContainerServiceOrchestratorProfile - :param custom_profile: Properties to configure a custom container service - cluster. - :type custom_profile: - ~azure.mgmt.containerservice.models.ContainerServiceCustomProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. Exact one of - secret or keyVaultSecretRef need to be specified. - :type service_principal_profile: - ~azure.mgmt.containerservice.models.ContainerServiceServicePrincipalProfile - :param master_profile: Required. Profile for the container service master. - :type master_profile: - ~azure.mgmt.containerservice.models.ContainerServiceMasterProfile - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.models.ContainerServiceAgentPoolProfile] - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.models.ContainerServiceWindowsProfile - :param linux_profile: Required. Profile for Linux VMs in the container - service cluster. - :type linux_profile: - ~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile - :param diagnostics_profile: Profile for diagnostics in the container - service cluster. - :type diagnostics_profile: - ~azure.mgmt.containerservice.models.ContainerServiceDiagnosticsProfile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'orchestrator_profile': {'required': True}, - 'master_profile': {'required': True}, - 'linux_profile': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'orchestrator_profile': {'key': 'properties.orchestratorProfile', 'type': 'ContainerServiceOrchestratorProfile'}, - 'custom_profile': {'key': 'properties.customProfile', 'type': 'ContainerServiceCustomProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServiceServicePrincipalProfile'}, - 'master_profile': {'key': 'properties.masterProfile', 'type': 'ContainerServiceMasterProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ContainerServiceAgentPoolProfile]'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ContainerServiceWindowsProfile'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'ContainerServiceDiagnosticsProfile'}, - } - - def __init__(self, *, location: str, orchestrator_profile, master_profile, linux_profile, tags=None, custom_profile=None, service_principal_profile=None, agent_pool_profiles=None, windows_profile=None, diagnostics_profile=None, **kwargs) -> None: - super(ContainerService, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.orchestrator_profile = orchestrator_profile - self.custom_profile = custom_profile - self.service_principal_profile = service_principal_profile - self.master_profile = master_profile - self.agent_pool_profiles = agent_pool_profiles - self.windows_profile = windows_profile - self.linux_profile = linux_profile - self.diagnostics_profile = diagnostics_profile diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_service_principal_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_service_principal_profile.py deleted file mode 100644 index acef0ac89b5..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_service_principal_profile.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. Either secret or keyVaultSecretRef must be - specified. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - :param key_vault_secret_ref: Reference to a secret stored in Azure Key - Vault. - :type key_vault_secret_ref: - ~azure.mgmt.containerservice.models.KeyVaultSecretRef - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - 'key_vault_secret_ref': {'key': 'keyVaultSecretRef', 'type': 'KeyVaultSecretRef'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - self.key_vault_secret_ref = kwargs.get('key_vault_secret_ref', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_service_principal_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_service_principal_profile_py3.py deleted file mode 100644 index f08ef052ac1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_service_principal_profile_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. Either secret or keyVaultSecretRef must be - specified. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - :param key_vault_secret_ref: Reference to a secret stored in Azure Key - Vault. - :type key_vault_secret_ref: - ~azure.mgmt.containerservice.models.KeyVaultSecretRef - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - 'key_vault_secret_ref': {'key': 'keyVaultSecretRef', 'type': 'KeyVaultSecretRef'}, - } - - def __init__(self, *, client_id: str, secret: str=None, key_vault_secret_ref=None, **kwargs) -> None: - super(ContainerServiceServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - self.key_vault_secret_ref = key_vault_secret_ref diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_configuration.py deleted file mode 100644 index cce2acd8790..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_configuration.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_configuration_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_configuration_py3.py deleted file mode 100644 index f11d2b896ab..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_configuration_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_public_key.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_public_key.py deleted file mode 100644 index da7609ba222..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_public_key.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_public_key_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_public_key_py3.py deleted file mode 100644 index 8e8c10544ef..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_public_key_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_vm_diagnostics.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_vm_diagnostics.py deleted file mode 100644 index f1804c66b68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_vm_diagnostics.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_vm_diagnostics_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_vm_diagnostics_py3.py deleted file mode 100644 index a716fc26954..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_vm_diagnostics_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_windows_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_windows_profile.py deleted file mode 100644 index 11acd234331..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_windows_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: Required. The administrator password to use for - Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_windows_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_windows_profile_py3.py deleted file mode 100644 index 3db1f89de79..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_windows_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: Required. The administrator password to use for - Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str, **kwargs) -> None: - super(ContainerServiceWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_result.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_result.py deleted file mode 100644 index 89e748b481b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_result.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(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 diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_result_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_result_py3.py deleted file mode 100644 index 6f387834bf0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_result_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_results.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_results.py deleted file mode 100644 index 6360ae308c4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_results.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_results_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_results_py3.py deleted file mode 100644 index ac5e843261f..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_results_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/key_vault_secret_ref.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/key_vault_secret_ref.py deleted file mode 100644 index 5e3c44cac59..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/key_vault_secret_ref.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretRef(Model): - """Reference to a secret stored in Azure Key Vault. - - All required parameters must be populated in order to send to Azure. - - :param vault_id: Required. Key vault identifier. - :type vault_id: str - :param secret_name: Required. The secret name. - :type secret_name: str - :param version: The secret version. - :type version: str - """ - - _validation = { - 'vault_id': {'required': True}, - 'secret_name': {'required': True}, - } - - _attribute_map = { - 'vault_id': {'key': 'vaultID', 'type': 'str'}, - 'secret_name': {'key': 'secretName', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultSecretRef, self).__init__(**kwargs) - self.vault_id = kwargs.get('vault_id', None) - self.secret_name = kwargs.get('secret_name', None) - self.version = kwargs.get('version', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/key_vault_secret_ref_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/key_vault_secret_ref_py3.py deleted file mode 100644 index be0824abfa9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/key_vault_secret_ref_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretRef(Model): - """Reference to a secret stored in Azure Key Vault. - - All required parameters must be populated in order to send to Azure. - - :param vault_id: Required. Key vault identifier. - :type vault_id: str - :param secret_name: Required. The secret name. - :type secret_name: str - :param version: The secret version. - :type version: str - """ - - _validation = { - 'vault_id': {'required': True}, - 'secret_name': {'required': True}, - } - - _attribute_map = { - 'vault_id': {'key': 'vaultID', 'type': 'str'}, - 'secret_name': {'key': 'secretName', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, vault_id: str, secret_name: str, version: str=None, **kwargs) -> None: - super(KeyVaultSecretRef, self).__init__(**kwargs) - self.vault_id = vault_id - self.secret_name = secret_name - self.version = version diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster.py deleted file mode 100644 index f7c50b26a58..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FDQN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.models.ManagedClusterAddonProfile] - :ivar node_resource_group: Name of the resource group containing agent - pool nodes. - :vartype node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.models.ManagedClusterAADProfile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'node_resource_group': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = None - self.enable_rbac = kwargs.get('enable_rbac', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_aad_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_aad_profile.py deleted file mode 100644 index 50e3acd14b6..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_aad_profile.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: Required. The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - 'server_app_secret': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_aad_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_aad_profile_py3.py deleted file mode 100644 index 6db15c1dd6c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_aad_profile_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: Required. The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - 'server_app_secret': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_access_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_access_profile.py deleted file mode 100644 index 6dc2a4ec23b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_access_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_access_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_access_profile_py3.py deleted file mode 100644 index 0d3fb998e97..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_access_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_addon_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_addon_profile.py deleted file mode 100644 index 796f9246a68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_addon_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_addon_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_addon_profile_py3.py deleted file mode 100644 index 71e05cd14c0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_addon_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_agent_pool_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_agent_pool_profile.py deleted file mode 100644 index b3213bf8b32..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_agent_pool_profile.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfile(Model): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 1 to 100 (inclusive). The default value is - 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :ivar storage_profile: Storage profile specifies what kind of storage - used. Defaults to ManagedDisks. Possible values include: 'StorageAccount', - 'ManagedDisks' - :vartype storage_profile: str or - ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or ~azure.mgmt.containerservice.models.OSType - """ - - _validation = { - 'name': {'required': True}, - 'count': {'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'storage_profile': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.storage_profile = None - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_agent_pool_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_agent_pool_profile_py3.py deleted file mode 100644 index c545cccfeac..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_agent_pool_profile_py3.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfile(Model): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 1 to 100 (inclusive). The default value is - 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :ivar storage_profile: Storage profile specifies what kind of storage - used. Defaults to ManagedDisks. Possible values include: 'StorageAccount', - 'ManagedDisks' - :vartype storage_profile: str or - ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or ~azure.mgmt.containerservice.models.OSType - """ - - _validation = { - 'name': {'required': True}, - 'count': {'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'storage_profile': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = name - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.storage_profile = None - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_paged.py deleted file mode 100644 index 0d1fa204a9f..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_pool_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_pool_upgrade_profile.py deleted file mode 100644 index b6967a4a13e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_pool_upgrade_profile.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or ~azure.mgmt.containerservice.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: list[str] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_pool_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_pool_upgrade_profile_py3.py deleted file mode 100644 index a7bc407e58e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_pool_upgrade_profile_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or ~azure.mgmt.containerservice.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: list[str] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[str]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_py3.py deleted file mode 100644 index 3f1534d09ae..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FDQN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.models.ManagedClusterAddonProfile] - :ivar node_resource_group: Name of the resource group containing agent - pool nodes. - :vartype node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.models.ManagedClusterAADProfile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'node_resource_group': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, service_principal_profile=None, addon_profiles=None, enable_rbac: bool=None, network_profile=None, aad_profile=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = None - self.enable_rbac = enable_rbac - self.network_profile = network_profile - self.aad_profile = aad_profile diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_service_principal_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_service_principal_profile.py deleted file mode 100644 index 4610cedac54..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_service_principal_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_service_principal_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_service_principal_profile_py3.py deleted file mode 100644 index 6ea9e92dc40..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_service_principal_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_upgrade_profile.py deleted file mode 100644 index 11825a0b739..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_upgrade_profile.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_upgrade_profile_py3.py deleted file mode 100644 index ff69e11fb1b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_upgrade_profile_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value.py deleted file mode 100644 index 911f9fc8088..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value_paged.py deleted file mode 100644 index ac39a71819a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value_py3.py deleted file mode 100644 index 55bceaa7543..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_profile.py deleted file mode 100644 index d5560a1f879..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = kwargs.get('orchestrator_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_profile_py3.py deleted file mode 100644 index f16e84a1fe3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, *, orchestrator_type: str, orchestrator_version: str, **kwargs) -> None: - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile.py deleted file mode 100644 index a906f913f69..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfile(Model): - """The profile of an orchestrator and its available versions. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - :param default: Required. Installed by default if version is not - specified. - :type default: bool - :param upgrades: Required. The list of available upgrade versions. - :type upgrades: - list[~azure.mgmt.containerservice.models.OrchestratorProfile] - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - 'default': {'required': True}, - 'upgrades': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'default': {'key': 'default', 'type': 'bool'}, - 'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'}, - } - - def __init__(self, **kwargs): - super(OrchestratorVersionProfile, self).__init__(**kwargs) - self.orchestrator_type = kwargs.get('orchestrator_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.default = kwargs.get('default', None) - self.upgrades = kwargs.get('upgrades', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_list_result.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_list_result.py deleted file mode 100644 index 27c2a65798a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_list_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfileListResult(Model): - """The list of versions for supported orchestrators. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the orchestrator version profile list result. - :vartype id: str - :ivar name: Name of the orchestrator version profile list result. - :vartype name: str - :ivar type: Type of the orchestrator version profile list result. - :vartype type: str - :param orchestrators: Required. List of orchestrator version profiles. - :type orchestrators: - list[~azure.mgmt.containerservice.models.OrchestratorVersionProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'orchestrators': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'}, - } - - def __init__(self, **kwargs): - super(OrchestratorVersionProfileListResult, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.orchestrators = kwargs.get('orchestrators', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_list_result_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_list_result_py3.py deleted file mode 100644 index b5bd30a5f54..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_list_result_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfileListResult(Model): - """The list of versions for supported orchestrators. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the orchestrator version profile list result. - :vartype id: str - :ivar name: Name of the orchestrator version profile list result. - :vartype name: str - :ivar type: Type of the orchestrator version profile list result. - :vartype type: str - :param orchestrators: Required. List of orchestrator version profiles. - :type orchestrators: - list[~azure.mgmt.containerservice.models.OrchestratorVersionProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'orchestrators': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'}, - } - - def __init__(self, *, orchestrators, **kwargs) -> None: - super(OrchestratorVersionProfileListResult, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.orchestrators = orchestrators diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_py3.py deleted file mode 100644 index c7bf212170a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfile(Model): - """The profile of an orchestrator and its available versions. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - :param default: Required. Installed by default if version is not - specified. - :type default: bool - :param upgrades: Required. The list of available upgrade versions. - :type upgrades: - list[~azure.mgmt.containerservice.models.OrchestratorProfile] - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - 'default': {'required': True}, - 'upgrades': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'default': {'key': 'default', 'type': 'bool'}, - 'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'}, - } - - def __init__(self, *, orchestrator_type: str, orchestrator_version: str, default: bool, upgrades, **kwargs) -> None: - super(OrchestratorVersionProfile, self).__init__(**kwargs) - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version - self.default = default - self.upgrades = upgrades diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/resource.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/resource.py deleted file mode 100644 index 5dd7d481c68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/resource_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/resource_py3.py deleted file mode 100644 index 2f3702caf60..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/tags_object.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/tags_object.py deleted file mode 100644 index 2966ec220f9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/tags_object.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/tags_object_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/tags_object_py3.py deleted file mode 100644 index 8be0bb4a15d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/tags_object_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/__init__.py deleted file mode 100644 index 551547c5317..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_services_operations import ContainerServicesOperations -from .operations import Operations -from .managed_clusters_operations import ManagedClustersOperations - -__all__ = [ - 'ContainerServicesOperations', - 'Operations', - 'ManagedClustersOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/container_services_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/container_services_operations.py deleted file mode 100644 index 887569a8a13..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/container_services_operations.py +++ /dev/null @@ -1,525 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ContainerServicesOperations(object): - """ContainerServicesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of container services in the specified subscription. - - Gets a list of container services in the specified subscription. The - operation returns properties of each container service including state, - orchestrator, number of masters and agents, and FQDNs of masters and - agents. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContainerService - :rtype: - ~azure.mgmt.containerservice.models.ContainerServicePaged[~azure.mgmt.containerservice.models.ContainerService] - :raises: :class:`CloudError` - """ - api_version = "2017-07-01" - - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ContainerServicePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ContainerServicePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices'} - - - def _create_or_update_initial( - self, resource_group_name, container_service_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2017-07-01" - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ContainerService') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ContainerService', response) - if response.status_code == 201: - deserialized = self._deserialize('ContainerService', response) - if response.status_code == 202: - deserialized = self._deserialize('ContainerService', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, container_service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a container service. - - Creates or updates a container service with the specified configuration - of orchestrator, masters, and agents. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param container_service_name: The name of the container service in - the specified subscription and resource group. - :type container_service_name: str - :param parameters: Parameters supplied to the Create or Update a - Container Service operation. - :type parameters: ~azure.mgmt.containerservice.models.ContainerService - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ContainerService or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.models.ContainerService] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.models.ContainerService]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - container_service_name=container_service_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ContainerService', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} - - def get( - self, resource_group_name, container_service_name, custom_headers=None, raw=False, **operation_config): - """Gets the properties of the specified container service. - - Gets the properties of the specified container service in the specified - subscription and resource group. The operation returns the properties - including state, orchestrator, number of masters and agents, and FQDNs - of masters and agents. . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param container_service_name: The name of the container service in - the specified subscription and resource group. - :type container_service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContainerService or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.models.ContainerService or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2017-07-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ContainerService', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} - - - def _delete_initial( - self, resource_group_name, container_service_name, custom_headers=None, raw=False, **operation_config): - api_version = "2017-07-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, container_service_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes the specified container service. - - Deletes the specified container service in the specified subscription - and resource group. The operation does not delete other resources - created as part of creating a container service, including storage - accounts, VMs, and availability sets. All the other resources created - with the container service are part of the same resource group and can - be deleted individually. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param container_service_name: The name of the container service in - the specified subscription and resource group. - :type container_service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - container_service_name=container_service_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of container services in the specified resource group. - - Gets a list of container services in the specified subscription and - resource group. The operation returns properties of each container - service including state, orchestrator, number of masters and agents, - and FQDNs of masters and agents. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContainerService - :rtype: - ~azure.mgmt.containerservice.models.ContainerServicePaged[~azure.mgmt.containerservice.models.ContainerService] - :raises: :class:`CloudError` - """ - api_version = "2017-07-01" - - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ContainerServicePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ContainerServicePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices'} - - def list_orchestrators( - self, location, resource_type=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported orchestrators in the specified subscription. - - Gets a list of supported orchestrators in the specified subscription. - The operation returns properties of each orchestrator including verison - and available upgrades. - - :param location: The name of a supported Azure region. - :type location: str - :param resource_type: resource type for which the list of - orchestrators needs to be returned - :type resource_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OrchestratorVersionProfileListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.models.OrchestratorVersionProfileListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2017-09-30" - - # Construct URL - url = self.list_orchestrators.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if resource_type is not None: - query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OrchestratorVersionProfileListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_orchestrators.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/managed_clusters_operations.py deleted file mode 100644 index ee38a71b40e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/managed_clusters_operations.py +++ /dev/null @@ -1,800 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-03-31". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-03-31" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.models.ManagedClusterPaged[~azure.mgmt.containerservice.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.models.ManagedClusterPaged[~azure.mgmt.containerservice.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.models.ManagedClusterUpgradeProfile or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.models.ManagedClusterAccessProfile or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets clusteradmin credential of a managed cluster. - - Gets clusteradmin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets clusteruser credential of a managed cluster. - - Gets clusteruser credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.models.ManagedCluster or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: ~azure.mgmt.containerservice.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/operations.py deleted file mode 100644 index a43ead3a313..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-03-31". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-03-31" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.models.OperationValuePaged[~azure.mgmt.containerservice.models.OperationValue] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/__init__.py old mode 100644 new mode 100755 index 9854e4f7645..eb3d7ba7a26 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/__init__.py @@ -1,18 +1,16 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from .container_service_client import ContainerServiceClient -from .version import VERSION - +from ._container_service_client import ContainerServiceClient __all__ = ['ContainerServiceClient'] -__version__ = VERSION - +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_configuration.py new file mode 100755 index 00000000000..86c0c85d090 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'azure-mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_container_service_client.py old mode 100644 new mode 100755 similarity index 52% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/container_service_client.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_container_service_client.py index 938e16974b7..e869970cf5d --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/container_service_client.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_container_service_client.py @@ -9,93 +9,82 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration +from typing import TYPE_CHECKING +from azure.mgmt.core import ARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin -from .version import VERSION +from msrest import Deserializer, Serializer +from ._configuration import ContainerServiceClientConfiguration -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse +class _SDKClient(object): + def __init__(self, *args, **kwargs): + """This is a fake class to support current implemetation of MultiApiClientMixin." + Will be removed in final version of multiapi azure-core based client + """ + pass -class ContainerServiceClient(MultiApiClientMixin, SDKClient): +class ContainerServiceClient(MultiApiClientMixin, _SDKClient): """The Container Service Client. - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. - :param str base_url: Service URL - :param profile: A dict using operation group name to API version. - :type profile: dict[str, str] + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2018-09-01' + DEFAULT_API_VERSION = '2021-05-01' _PROFILE_TAG = "azure.mgmt.containerservice.ContainerServiceClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { - 'open_shift_managed_clusters': '2018-09-30-preview', + None: DEFAULT_API_VERSION, 'container_services': '2017-07-01', - 'managed_clusters': '2020-01-01', - 'operations': '2018-03-31', - None: DEFAULT_API_VERSION + 'open_shift_managed_clusters': '2019-04-30', }}, _PROFILE_TAG + " latest" ) - def __init__(self, credentials, subscription_id, api_version=None, base_url=None, profile=KnownProfiles.default): - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + api_version=None, # type: Optional[str] + base_url=None, # type: Optional[str] + profile=KnownProfiles.default, # type: KnownProfiles + **kwargs # type: Any + ): + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) super(ContainerServiceClient, self).__init__( - credentials, - self.config, api_version=api_version, profile=profile ) -############ Generated from here ############ - @classmethod def _models_dict(cls, api_version): return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} @@ -108,20 +97,27 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2018-03-31: :mod:`v2018_03_31.models` * 2018-08-01-preview: :mod:`v2018_08_01_preview.models` * 2018-09-30-preview: :mod:`v2018_09_30_preview.models` - * 2019-02-01: :mod:`v2019_02_01_.models` - * 2019-04-01: :mod:`v2019_04_01_.models` - * 2019-08-01: :mod:`v2019_08_01_.models` - * 2019-10-01: :mod:`v2019_10_01_.models` - * 2020-01-01: :mod:`v2020_01_01_.models` - * 2020-02-01: :mod:`v2020_02_01_.models` - * 2020-03-01: :mod:`v2020_03_01_.models` - * 2020-04-01: :mod:`v2020_04_01_.models` - * 2020-06-01: :mod:`v2020_06_01_.models` - * 2020-11-01: :mod:`v2020_11_01_.models` - * 2020-12-01: :mod:`v2020_12_01_.models` - * 2021-02-01: :mod:`v2021_02_01_.models` - * 2021-03-01: :mod:`v2021_03_01_.models` - * 2021-05-01: :mod:`v2021_05_01_.models` + * 2019-02-01: :mod:`v2019_02_01.models` + * 2019-04-01: :mod:`v2019_04_01.models` + * 2019-04-30: :mod:`v2019_04_30.models` + * 2019-06-01: :mod:`v2019_06_01.models` + * 2019-08-01: :mod:`v2019_08_01.models` + * 2019-09-30-preview: :mod:`v2019_09_30_preview.models` + * 2019-10-01: :mod:`v2019_10_01.models` + * 2019-10-27-preview: :mod:`v2019_10_27_preview.models` + * 2019-11-01: :mod:`v2019_11_01.models` + * 2020-01-01: :mod:`v2020_01_01.models` + * 2020-02-01: :mod:`v2020_02_01.models` + * 2020-03-01: :mod:`v2020_03_01.models` + * 2020-04-01: :mod:`v2020_04_01.models` + * 2020-06-01: :mod:`v2020_06_01.models` + * 2020-07-01: :mod:`v2020_07_01.models` + * 2020-09-01: :mod:`v2020_09_01.models` + * 2020-11-01: :mod:`v2020_11_01.models` + * 2020-12-01: :mod:`v2020_12_01.models` + * 2021-02-01: :mod:`v2021_02_01.models` + * 2021-03-01: :mod:`v2021_03_01.models` + * 2021-05-01: :mod:`v2021_05_01.models` """ if api_version == '2017-07-01': from .v2017_07_01 import models @@ -141,12 +137,27 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2019-04-01': from .v2019_04_01 import models return models + elif api_version == '2019-04-30': + from .v2019_04_30 import models + return models + elif api_version == '2019-06-01': + from .v2019_06_01 import models + return models elif api_version == '2019-08-01': from .v2019_08_01 import models return models + elif api_version == '2019-09-30-preview': + from .v2019_09_30_preview import models + return models elif api_version == '2019-10-01': from .v2019_10_01 import models return models + elif api_version == '2019-10-27-preview': + from .v2019_10_27_preview import models + return models + elif api_version == '2019-11-01': + from .v2019_11_01 import models + return models elif api_version == '2020-01-01': from .v2020_01_01 import models return models @@ -162,6 +173,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2020-06-01': from .v2020_06_01 import models return models + elif api_version == '2020-07-01': + from .v2020_07_01 import models + return models elif api_version == '2020-09-01': from .v2020_09_01 import models return models @@ -180,29 +194,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-05-01': from .v2021_05_01 import models return models - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - - @property - def maintenance_configurations(self): - """Instance depends on the API version: - - * 2020-12-01: :class:`MaintenanceConfigurationsOperations` - * 2021-02-01: :class:`MaintenanceConfigurationsOperations` - * 2021-03-01: :class:`MaintenanceConfigurationsOperations` - * 2021-05-01: :class:`MaintenanceConfigurationsOperations` - """ - api_version = self._get_api_version('maintenance_configurations') - if api_version == '2020-12-01': - from .v2020_12_01.operations import MaintenanceConfigurationsOperations as OperationClass - elif api_version == '2021-02-01': - from .v2021_02_01.operations import MaintenanceConfigurationsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import MaintenanceConfigurationsOperations as OperationClass - elif api_version == '2021-05-01': - from .v2021_05_01.operations import MaintenanceConfigurationsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + raise ValueError("API version {} is not available".format(api_version)) @property def agent_pools(self): @@ -210,13 +202,16 @@ def agent_pools(self): * 2019-02-01: :class:`AgentPoolsOperations` * 2019-04-01: :class:`AgentPoolsOperations` + * 2019-06-01: :class:`AgentPoolsOperations` * 2019-08-01: :class:`AgentPoolsOperations` * 2019-10-01: :class:`AgentPoolsOperations` + * 2019-11-01: :class:`AgentPoolsOperations` * 2020-01-01: :class:`AgentPoolsOperations` * 2020-02-01: :class:`AgentPoolsOperations` * 2020-03-01: :class:`AgentPoolsOperations` * 2020-04-01: :class:`AgentPoolsOperations` * 2020-06-01: :class:`AgentPoolsOperations` + * 2020-07-01: :class:`AgentPoolsOperations` * 2020-09-01: :class:`AgentPoolsOperations` * 2020-11-01: :class:`AgentPoolsOperations` * 2020-12-01: :class:`AgentPoolsOperations` @@ -229,10 +224,14 @@ def agent_pools(self): from .v2019_02_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2019-04-01': from .v2019_04_01.operations import AgentPoolsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2019-10-01': from .v2019_10_01.operations import AgentPoolsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2020-01-01': from .v2020_01_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2020-02-01': @@ -243,6 +242,8 @@ def agent_pools(self): from .v2020_04_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import AgentPoolsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2020-09-01': from .v2020_09_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2020-11-01': @@ -256,8 +257,8 @@ def agent_pools(self): elif api_version == '2021-05-01': from .v2021_05_01.operations import AgentPoolsOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + raise ValueError("API version {} does not have operation group 'agent_pools'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property def container_services(self): @@ -268,50 +269,31 @@ def container_services(self): api_version = self._get_api_version('container_services') if api_version == '2017-07-01': from .v2017_07_01.operations import ContainerServicesOperations as OperationClass - elif api_version == "2019-04-01": - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2019-08-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2019-10-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2019-10-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-01-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-01-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-02-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-02-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-03-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-03-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-04-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-04-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-06-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-06-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-09-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-09-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-11-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-11-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-12-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-12-01 generated Python SDK contains no list_orchestrator op + else: + raise ValueError("API version {} does not have operation group 'container_services'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def maintenance_configurations(self): + """Instance depends on the API version: + + * 2020-12-01: :class:`MaintenanceConfigurationsOperations` + * 2021-02-01: :class:`MaintenanceConfigurationsOperations` + * 2021-03-01: :class:`MaintenanceConfigurationsOperations` + * 2021-05-01: :class:`MaintenanceConfigurationsOperations` + """ + api_version = self._get_api_version('maintenance_configurations') + if api_version == '2020-12-01': + from .v2020_12_01.operations import MaintenanceConfigurationsOperations as OperationClass elif api_version == '2021-02-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2021-02-01 generated Python SDK contains no list_orchestrator op + from .v2021_02_01.operations import MaintenanceConfigurationsOperations as OperationClass elif api_version == '2021-03-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2021-03-01 generated Python SDK contains no list_orchestrator op + from .v2021_03_01.operations import MaintenanceConfigurationsOperations as OperationClass elif api_version == '2021-05-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2021-05-01 generated Python SDK contains no list_orchestrator op + from .v2021_05_01.operations import MaintenanceConfigurationsOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + raise ValueError("API version {} does not have operation group 'maintenance_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property def managed_clusters(self): @@ -321,13 +303,16 @@ def managed_clusters(self): * 2018-08-01-preview: :class:`ManagedClustersOperations` * 2019-02-01: :class:`ManagedClustersOperations` * 2019-04-01: :class:`ManagedClustersOperations` + * 2019-06-01: :class:`ManagedClustersOperations` * 2019-08-01: :class:`ManagedClustersOperations` * 2019-10-01: :class:`ManagedClustersOperations` + * 2019-11-01: :class:`ManagedClustersOperations` * 2020-01-01: :class:`ManagedClustersOperations` * 2020-02-01: :class:`ManagedClustersOperations` * 2020-03-01: :class:`ManagedClustersOperations` * 2020-04-01: :class:`ManagedClustersOperations` * 2020-06-01: :class:`ManagedClustersOperations` + * 2020-07-01: :class:`ManagedClustersOperations` * 2020-09-01: :class:`ManagedClustersOperations` * 2020-11-01: :class:`ManagedClustersOperations` * 2020-12-01: :class:`ManagedClustersOperations` @@ -344,10 +329,14 @@ def managed_clusters(self): from .v2019_02_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2019-04-01': from .v2019_04_01.operations import ManagedClustersOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2019-10-01': from .v2019_10_01.operations import ManagedClustersOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2020-01-01': from .v2020_01_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2020-02-01': @@ -358,6 +347,8 @@ def managed_clusters(self): from .v2020_04_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import ManagedClustersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2020-09-01': from .v2020_09_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2020-11-01': @@ -371,21 +362,30 @@ def managed_clusters(self): elif api_version == '2021-05-01': from .v2021_05_01.operations import ManagedClustersOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + raise ValueError("API version {} does not have operation group 'managed_clusters'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property def open_shift_managed_clusters(self): """Instance depends on the API version: * 2018-09-30-preview: :class:`OpenShiftManagedClustersOperations` + * 2019-04-30: :class:`OpenShiftManagedClustersOperations` + * 2019-09-30-preview: :class:`OpenShiftManagedClustersOperations` + * 2019-10-27-preview: :class:`OpenShiftManagedClustersOperations` """ api_version = self._get_api_version('open_shift_managed_clusters') if api_version == '2018-09-30-preview': from .v2018_09_30_preview.operations import OpenShiftManagedClustersOperations as OperationClass + elif api_version == '2019-04-30': + from .v2019_04_30.operations import OpenShiftManagedClustersOperations as OperationClass + elif api_version == '2019-09-30-preview': + from .v2019_09_30_preview.operations import OpenShiftManagedClustersOperations as OperationClass + elif api_version == '2019-10-27-preview': + from .v2019_10_27_preview.operations import OpenShiftManagedClustersOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + raise ValueError("API version {} does not have operation group 'open_shift_managed_clusters'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property def operations(self): @@ -395,13 +395,16 @@ def operations(self): * 2018-08-01-preview: :class:`Operations` * 2019-02-01: :class:`Operations` * 2019-04-01: :class:`Operations` + * 2019-06-01: :class:`Operations` * 2019-08-01: :class:`Operations` * 2019-10-01: :class:`Operations` + * 2019-11-01: :class:`Operations` * 2020-01-01: :class:`Operations` * 2020-02-01: :class:`Operations` * 2020-03-01: :class:`Operations` * 2020-04-01: :class:`Operations` * 2020-06-01: :class:`Operations` + * 2020-07-01: :class:`Operations` * 2020-09-01: :class:`Operations` * 2020-11-01: :class:`Operations` * 2020-12-01: :class:`Operations` @@ -418,10 +421,14 @@ def operations(self): from .v2019_02_01.operations import Operations as OperationClass elif api_version == '2019-04-01': from .v2019_04_01.operations import Operations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import Operations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import Operations as OperationClass elif api_version == '2019-10-01': from .v2019_10_01.operations import Operations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import Operations as OperationClass elif api_version == '2020-01-01': from .v2020_01_01.operations import Operations as OperationClass elif api_version == '2020-02-01': @@ -432,6 +439,8 @@ def operations(self): from .v2020_04_01.operations import Operations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import Operations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import Operations as OperationClass elif api_version == '2020-09-01': from .v2020_09_01.operations import Operations as OperationClass elif api_version == '2020-11-01': @@ -445,5 +454,103 @@ def operations(self): elif api_version == '2021-05-01': from .v2021_05_01.operations import Operations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def private_endpoint_connections(self): + """Instance depends on the API version: + + * 2020-06-01: :class:`PrivateEndpointConnectionsOperations` + * 2020-07-01: :class:`PrivateEndpointConnectionsOperations` + * 2020-09-01: :class:`PrivateEndpointConnectionsOperations` + * 2020-11-01: :class:`PrivateEndpointConnectionsOperations` + * 2020-12-01: :class:`PrivateEndpointConnectionsOperations` + * 2021-02-01: :class:`PrivateEndpointConnectionsOperations` + * 2021-03-01: :class:`PrivateEndpointConnectionsOperations` + * 2021-05-01: :class:`PrivateEndpointConnectionsOperations` + """ + api_version = self._get_api_version('private_endpoint_connections') + if api_version == '2020-06-01': + from .v2020_06_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PrivateEndpointConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def private_link_resources(self): + """Instance depends on the API version: + + * 2020-09-01: :class:`PrivateLinkResourcesOperations` + * 2020-11-01: :class:`PrivateLinkResourcesOperations` + * 2020-12-01: :class:`PrivateLinkResourcesOperations` + * 2021-02-01: :class:`PrivateLinkResourcesOperations` + * 2021-03-01: :class:`PrivateLinkResourcesOperations` + * 2021-05-01: :class:`PrivateLinkResourcesOperations` + """ + api_version = self._get_api_version('private_link_resources') + if api_version == '2020-09-01': + from .v2020_09_01.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PrivateLinkResourcesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def resolve_private_link_service_id(self): + """Instance depends on the API version: + + * 2020-09-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2020-11-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2020-12-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2021-02-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2021-03-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2021-05-01: :class:`ResolvePrivateLinkServiceIdOperations` + """ + api_version = self._get_api_version('resolve_private_link_service_id') + if api_version == '2020-09-01': + from .v2020_09_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'resolve_private_link_service_id'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + def close(self): + self._client.close() + def __enter__(self): + self._client.__enter__() + return self + def __exit__(self, *exc_details): + self._client.__exit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_version.py old mode 100644 new mode 100755 similarity index 96% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/version.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_version.py index 7331ae4ca3a..ef6549b6f33 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/version.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_version.py @@ -9,4 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "11.0.0" +VERSION = "16.0.0" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/models.py old mode 100644 new mode 100755 index c7e9658fe5e..46a4c060a97 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/models.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/models.py @@ -3,28 +3,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. # -------------------------------------------------------------------------- - from .v2017_07_01.models import * -from .v2018_03_31.models import * -from .v2018_08_01_preview.models import * -from .v2018_09_30_preview.models import * -from .v2019_02_01.models import * -from .v2019_04_01.models import * -from .v2019_08_01.models import * -from .v2019_10_01.models import * -from .v2020_01_01.models import * -from .v2020_02_01.models import * -from .v2020_03_01.models import * -from .v2020_04_01.models import * -from .v2020_06_01.models import * -from .v2020_09_01.models import * -from .v2020_11_01.models import * -from .v2020_12_01.models import * -from .v2021_02_01.models import * -from .v2021_03_01.models import * -from .v2021_05_01.models import * \ No newline at end of file +from .v2019_04_30.models import * +from .v2021_05_01.models import * diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/__init__.py old mode 100644 new mode 100755 similarity index 68% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/__init__.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/__init__.py index 9854e4f7645..eb3d7ba7a26 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/__init__.py @@ -1,18 +1,16 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from .container_service_client import ContainerServiceClient -from .version import VERSION - +from ._container_service_client import ContainerServiceClient __all__ = ['ContainerServiceClient'] -__version__ = VERSION - +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/_configuration.py new file mode 100755 index 00000000000..085ca045efa --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/_configuration.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/_container_service_client.py new file mode 100755 index 00000000000..2e860be77ae --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/_container_service_client.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import ContainerServiceClientConfiguration +from .operations import ContainerServicesOperations +from . import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar container_services: ContainerServicesOperations operations + :vartype container_services: azure.mgmt.containerservice.v2017_07_01.operations.ContainerServicesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.container_services = ContainerServicesOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> ContainerServiceClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/__init__.py old mode 100644 new mode 100755 similarity index 73% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/version.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/__init__.py index fc241ef662d..4ad2bb20096 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/version.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/__init__.py @@ -1,13 +1,10 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2019-02-01" - +from ._container_service_client import ContainerServiceClient +__all__ = ['ContainerServiceClient'] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/_configuration.py new file mode 100755 index 00000000000..fc5eb921630 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/_configuration.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/_container_service_client.py new file mode 100755 index 00000000000..3285c25911c --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/_container_service_client.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import ContainerServiceClientConfiguration +from .operations import ContainerServicesOperations +from .. import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar container_services: ContainerServicesOperations operations + :vartype container_services: azure.mgmt.containerservice.v2017_07_01.aio.operations.ContainerServicesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.container_services = ContainerServicesOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ContainerServiceClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/operations/__init__.py new file mode 100755 index 00000000000..db0e90a3a5a --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/operations/__init__.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_services_operations import ContainerServicesOperations + +__all__ = [ + 'ContainerServicesOperations', +] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/operations/_container_services_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/operations/_container_services_operations.py new file mode 100755 index 00000000000..a837c0c0626 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/operations/_container_services_operations.py @@ -0,0 +1,561 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ContainerServicesOperations: + """ContainerServicesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2017_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ContainerServiceListResult"]: + """Gets a list of container services in the specified subscription. + + Gets a list of container services in the specified subscription. The operation returns + properties of each container service including state, orchestrator, number of masters and + agents, and FQDNs of masters and agents. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ContainerServiceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ContainerServiceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + container_service_name: str, + parameters: "_models.ContainerService", + **kwargs: Any + ) -> "_models.ContainerService": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ContainerService') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ContainerService', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ContainerService', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ContainerService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + container_service_name: str, + parameters: "_models.ContainerService", + **kwargs: Any + ) -> AsyncLROPoller["_models.ContainerService"]: + """Creates or updates a container service. + + Creates or updates a container service with the specified configuration of orchestrator, + masters, and agents. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_service_name: The name of the container service in the specified subscription + and resource group. + :type container_service_name: str + :param parameters: Parameters supplied to the Create or Update a Container Service operation. + :type parameters: ~azure.mgmt.containerservice.v2017_07_01.models.ContainerService + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ContainerService or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2017_07_01.models.ContainerService] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerService"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + container_service_name=container_service_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ContainerService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + container_service_name: str, + **kwargs: Any + ) -> "_models.ContainerService": + """Gets the properties of the specified container service. + + Gets the properties of the specified container service in the specified subscription and + resource group. The operation returns the properties including state, orchestrator, number of + masters and agents, and FQDNs of masters and agents. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_service_name: The name of the container service in the specified subscription + and resource group. + :type container_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ContainerService, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2017_07_01.models.ContainerService + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ContainerService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + container_service_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + container_service_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified container service. + + Deletes the specified container service in the specified subscription and resource group. The + operation does not delete other resources created as part of creating a container service, + including storage accounts, VMs, and availability sets. All the other resources created with + the container service are part of the same resource group and can be deleted individually. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_service_name: The name of the container service in the specified subscription + and resource group. + :type container_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + container_service_name=container_service_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ContainerServiceListResult"]: + """Gets a list of container services in the specified resource group. + + Gets a list of container services in the specified subscription and resource group. The + operation returns properties of each container service including state, orchestrator, number of + masters and agents, and FQDNs of masters and agents. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ContainerServiceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ContainerServiceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices'} # type: ignore + + async def list_orchestrators( + self, + location: str, + resource_type: Optional[str] = None, + **kwargs: Any + ) -> "_models.OrchestratorVersionProfileListResult": + """Gets a list of supported orchestrators in the specified subscription. + + Gets a list of supported orchestrators in the specified subscription. The operation returns + properties of each orchestrator including version, available upgrades and whether that version + or upgrades are in preview. + + :param location: The name of a supported Azure region. + :type location: str + :param resource_type: resource type for which the list of orchestrators needs to be returned. + :type resource_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OrchestratorVersionProfileListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorVersionProfileListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrchestratorVersionProfileListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.list_orchestrators.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if resource_type is not None: + query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OrchestratorVersionProfileListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_orchestrators.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/__init__.py new file mode 100755 index 00000000000..756ee52d39f --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/__init__.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import ContainerService + from ._models_py3 import ContainerServiceAgentPoolProfile + from ._models_py3 import ContainerServiceCustomProfile + from ._models_py3 import ContainerServiceDiagnosticsProfile + from ._models_py3 import ContainerServiceLinuxProfile + from ._models_py3 import ContainerServiceListResult + from ._models_py3 import ContainerServiceMasterProfile + from ._models_py3 import ContainerServiceOrchestratorProfile + from ._models_py3 import ContainerServicePrincipalProfile + from ._models_py3 import ContainerServiceSshConfiguration + from ._models_py3 import ContainerServiceSshPublicKey + from ._models_py3 import ContainerServiceVMDiagnostics + from ._models_py3 import ContainerServiceWindowsProfile + from ._models_py3 import KeyVaultSecretRef + from ._models_py3 import OrchestratorProfile + from ._models_py3 import OrchestratorVersionProfile + from ._models_py3 import OrchestratorVersionProfileListResult + from ._models_py3 import Resource +except (SyntaxError, ImportError): + from ._models import ContainerService # type: ignore + from ._models import ContainerServiceAgentPoolProfile # type: ignore + from ._models import ContainerServiceCustomProfile # type: ignore + from ._models import ContainerServiceDiagnosticsProfile # type: ignore + from ._models import ContainerServiceLinuxProfile # type: ignore + from ._models import ContainerServiceListResult # type: ignore + from ._models import ContainerServiceMasterProfile # type: ignore + from ._models import ContainerServiceOrchestratorProfile # type: ignore + from ._models import ContainerServicePrincipalProfile # type: ignore + from ._models import ContainerServiceSshConfiguration # type: ignore + from ._models import ContainerServiceSshPublicKey # type: ignore + from ._models import ContainerServiceVMDiagnostics # type: ignore + from ._models import ContainerServiceWindowsProfile # type: ignore + from ._models import KeyVaultSecretRef # type: ignore + from ._models import OrchestratorProfile # type: ignore + from ._models import OrchestratorVersionProfile # type: ignore + from ._models import OrchestratorVersionProfileListResult # type: ignore + from ._models import Resource # type: ignore + +from ._container_service_client_enums import ( + ContainerServiceOrchestratorTypes, + ContainerServiceStorageProfileTypes, + ContainerServiceVMSizeTypes, + Count, + OSType, +) + +__all__ = [ + 'ContainerService', + 'ContainerServiceAgentPoolProfile', + 'ContainerServiceCustomProfile', + 'ContainerServiceDiagnosticsProfile', + 'ContainerServiceLinuxProfile', + 'ContainerServiceListResult', + 'ContainerServiceMasterProfile', + 'ContainerServiceOrchestratorProfile', + 'ContainerServicePrincipalProfile', + 'ContainerServiceSshConfiguration', + 'ContainerServiceSshPublicKey', + 'ContainerServiceVMDiagnostics', + 'ContainerServiceWindowsProfile', + 'KeyVaultSecretRef', + 'OrchestratorProfile', + 'OrchestratorVersionProfile', + 'OrchestratorVersionProfileListResult', + 'Resource', + 'ContainerServiceOrchestratorTypes', + 'ContainerServiceStorageProfileTypes', + 'ContainerServiceVMSizeTypes', + 'Count', + 'OSType', +] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_container_service_client_enums.py new file mode 100755 index 00000000000..a14dea47c37 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_container_service_client_enums.py @@ -0,0 +1,241 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class ContainerServiceOrchestratorTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The orchestrator to use to manage container service cluster resources. Valid values are + Kubernetes, Swarm, DCOS, DockerCE and Custom. + """ + + KUBERNETES = "Kubernetes" + SWARM = "Swarm" + DCOS = "DCOS" + DOCKER_CE = "DockerCE" + CUSTOM = "Custom" + +class ContainerServiceStorageProfileTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Storage profile specifies what kind of storage used. Choose from StorageAccount and + ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. + """ + + STORAGE_ACCOUNT = "StorageAccount" + MANAGED_DISKS = "ManagedDisks" + +class ContainerServiceVMSizeTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Size of agent VMs. + """ + + STANDARD_A1 = "Standard_A1" + STANDARD_A10 = "Standard_A10" + STANDARD_A11 = "Standard_A11" + STANDARD_A1_V2 = "Standard_A1_v2" + STANDARD_A2 = "Standard_A2" + STANDARD_A2_V2 = "Standard_A2_v2" + STANDARD_A2_M_V2 = "Standard_A2m_v2" + STANDARD_A3 = "Standard_A3" + STANDARD_A4 = "Standard_A4" + STANDARD_A4_V2 = "Standard_A4_v2" + STANDARD_A4_M_V2 = "Standard_A4m_v2" + STANDARD_A5 = "Standard_A5" + STANDARD_A6 = "Standard_A6" + STANDARD_A7 = "Standard_A7" + STANDARD_A8 = "Standard_A8" + STANDARD_A8_V2 = "Standard_A8_v2" + STANDARD_A8_M_V2 = "Standard_A8m_v2" + STANDARD_A9 = "Standard_A9" + STANDARD_B2_MS = "Standard_B2ms" + STANDARD_B2_S = "Standard_B2s" + STANDARD_B4_MS = "Standard_B4ms" + STANDARD_B8_MS = "Standard_B8ms" + STANDARD_D1 = "Standard_D1" + STANDARD_D11 = "Standard_D11" + STANDARD_D11_V2 = "Standard_D11_v2" + STANDARD_D11_V2_PROMO = "Standard_D11_v2_Promo" + STANDARD_D12 = "Standard_D12" + STANDARD_D12_V2 = "Standard_D12_v2" + STANDARD_D12_V2_PROMO = "Standard_D12_v2_Promo" + STANDARD_D13 = "Standard_D13" + STANDARD_D13_V2 = "Standard_D13_v2" + STANDARD_D13_V2_PROMO = "Standard_D13_v2_Promo" + STANDARD_D14 = "Standard_D14" + STANDARD_D14_V2 = "Standard_D14_v2" + STANDARD_D14_V2_PROMO = "Standard_D14_v2_Promo" + STANDARD_D15_V2 = "Standard_D15_v2" + STANDARD_D16_V3 = "Standard_D16_v3" + STANDARD_D16_S_V3 = "Standard_D16s_v3" + STANDARD_D1_V2 = "Standard_D1_v2" + STANDARD_D2 = "Standard_D2" + STANDARD_D2_V2 = "Standard_D2_v2" + STANDARD_D2_V2_PROMO = "Standard_D2_v2_Promo" + STANDARD_D2_V3 = "Standard_D2_v3" + STANDARD_D2_S_V3 = "Standard_D2s_v3" + STANDARD_D3 = "Standard_D3" + STANDARD_D32_V3 = "Standard_D32_v3" + STANDARD_D32_S_V3 = "Standard_D32s_v3" + STANDARD_D3_V2 = "Standard_D3_v2" + STANDARD_D3_V2_PROMO = "Standard_D3_v2_Promo" + STANDARD_D4 = "Standard_D4" + STANDARD_D4_V2 = "Standard_D4_v2" + STANDARD_D4_V2_PROMO = "Standard_D4_v2_Promo" + STANDARD_D4_V3 = "Standard_D4_v3" + STANDARD_D4_S_V3 = "Standard_D4s_v3" + STANDARD_D5_V2 = "Standard_D5_v2" + STANDARD_D5_V2_PROMO = "Standard_D5_v2_Promo" + STANDARD_D64_V3 = "Standard_D64_v3" + STANDARD_D64_S_V3 = "Standard_D64s_v3" + STANDARD_D8_V3 = "Standard_D8_v3" + STANDARD_D8_S_V3 = "Standard_D8s_v3" + STANDARD_DS1 = "Standard_DS1" + STANDARD_DS11 = "Standard_DS11" + STANDARD_DS11_V2 = "Standard_DS11_v2" + STANDARD_DS11_V2_PROMO = "Standard_DS11_v2_Promo" + STANDARD_DS12 = "Standard_DS12" + STANDARD_DS12_V2 = "Standard_DS12_v2" + STANDARD_DS12_V2_PROMO = "Standard_DS12_v2_Promo" + STANDARD_DS13 = "Standard_DS13" + STANDARD_DS13_2_V2 = "Standard_DS13-2_v2" + STANDARD_DS13_4_V2 = "Standard_DS13-4_v2" + STANDARD_DS13_V2 = "Standard_DS13_v2" + STANDARD_DS13_V2_PROMO = "Standard_DS13_v2_Promo" + STANDARD_DS14 = "Standard_DS14" + STANDARD_DS14_4_V2 = "Standard_DS14-4_v2" + STANDARD_DS14_8_V2 = "Standard_DS14-8_v2" + STANDARD_DS14_V2 = "Standard_DS14_v2" + STANDARD_DS14_V2_PROMO = "Standard_DS14_v2_Promo" + STANDARD_DS15_V2 = "Standard_DS15_v2" + STANDARD_DS1_V2 = "Standard_DS1_v2" + STANDARD_DS2 = "Standard_DS2" + STANDARD_DS2_V2 = "Standard_DS2_v2" + STANDARD_DS2_V2_PROMO = "Standard_DS2_v2_Promo" + STANDARD_DS3 = "Standard_DS3" + STANDARD_DS3_V2 = "Standard_DS3_v2" + STANDARD_DS3_V2_PROMO = "Standard_DS3_v2_Promo" + STANDARD_DS4 = "Standard_DS4" + STANDARD_DS4_V2 = "Standard_DS4_v2" + STANDARD_DS4_V2_PROMO = "Standard_DS4_v2_Promo" + STANDARD_DS5_V2 = "Standard_DS5_v2" + STANDARD_DS5_V2_PROMO = "Standard_DS5_v2_Promo" + STANDARD_E16_V3 = "Standard_E16_v3" + STANDARD_E16_S_V3 = "Standard_E16s_v3" + STANDARD_E2_V3 = "Standard_E2_v3" + STANDARD_E2_S_V3 = "Standard_E2s_v3" + STANDARD_E32_16_S_V3 = "Standard_E32-16s_v3" + STANDARD_E32_8_S_V3 = "Standard_E32-8s_v3" + STANDARD_E32_V3 = "Standard_E32_v3" + STANDARD_E32_S_V3 = "Standard_E32s_v3" + STANDARD_E4_V3 = "Standard_E4_v3" + STANDARD_E4_S_V3 = "Standard_E4s_v3" + STANDARD_E64_16_S_V3 = "Standard_E64-16s_v3" + STANDARD_E64_32_S_V3 = "Standard_E64-32s_v3" + STANDARD_E64_V3 = "Standard_E64_v3" + STANDARD_E64_S_V3 = "Standard_E64s_v3" + STANDARD_E8_V3 = "Standard_E8_v3" + STANDARD_E8_S_V3 = "Standard_E8s_v3" + STANDARD_F1 = "Standard_F1" + STANDARD_F16 = "Standard_F16" + STANDARD_F16_S = "Standard_F16s" + STANDARD_F16_S_V2 = "Standard_F16s_v2" + STANDARD_F1_S = "Standard_F1s" + STANDARD_F2 = "Standard_F2" + STANDARD_F2_S = "Standard_F2s" + STANDARD_F2_S_V2 = "Standard_F2s_v2" + STANDARD_F32_S_V2 = "Standard_F32s_v2" + STANDARD_F4 = "Standard_F4" + STANDARD_F4_S = "Standard_F4s" + STANDARD_F4_S_V2 = "Standard_F4s_v2" + STANDARD_F64_S_V2 = "Standard_F64s_v2" + STANDARD_F72_S_V2 = "Standard_F72s_v2" + STANDARD_F8 = "Standard_F8" + STANDARD_F8_S = "Standard_F8s" + STANDARD_F8_S_V2 = "Standard_F8s_v2" + STANDARD_G1 = "Standard_G1" + STANDARD_G2 = "Standard_G2" + STANDARD_G3 = "Standard_G3" + STANDARD_G4 = "Standard_G4" + STANDARD_G5 = "Standard_G5" + STANDARD_GS1 = "Standard_GS1" + STANDARD_GS2 = "Standard_GS2" + STANDARD_GS3 = "Standard_GS3" + STANDARD_GS4 = "Standard_GS4" + STANDARD_GS4_4 = "Standard_GS4-4" + STANDARD_GS4_8 = "Standard_GS4-8" + STANDARD_GS5 = "Standard_GS5" + STANDARD_GS5_16 = "Standard_GS5-16" + STANDARD_GS5_8 = "Standard_GS5-8" + STANDARD_H16 = "Standard_H16" + STANDARD_H16_M = "Standard_H16m" + STANDARD_H16_MR = "Standard_H16mr" + STANDARD_H16_R = "Standard_H16r" + STANDARD_H8 = "Standard_H8" + STANDARD_H8_M = "Standard_H8m" + STANDARD_L16_S = "Standard_L16s" + STANDARD_L32_S = "Standard_L32s" + STANDARD_L4_S = "Standard_L4s" + STANDARD_L8_S = "Standard_L8s" + STANDARD_M128_32_MS = "Standard_M128-32ms" + STANDARD_M128_64_MS = "Standard_M128-64ms" + STANDARD_M128_MS = "Standard_M128ms" + STANDARD_M128_S = "Standard_M128s" + STANDARD_M64_16_MS = "Standard_M64-16ms" + STANDARD_M64_32_MS = "Standard_M64-32ms" + STANDARD_M64_MS = "Standard_M64ms" + STANDARD_M64_S = "Standard_M64s" + STANDARD_NC12 = "Standard_NC12" + STANDARD_NC12_S_V2 = "Standard_NC12s_v2" + STANDARD_NC12_S_V3 = "Standard_NC12s_v3" + STANDARD_NC24 = "Standard_NC24" + STANDARD_NC24_R = "Standard_NC24r" + STANDARD_NC24_RS_V2 = "Standard_NC24rs_v2" + STANDARD_NC24_RS_V3 = "Standard_NC24rs_v3" + STANDARD_NC24_S_V2 = "Standard_NC24s_v2" + STANDARD_NC24_S_V3 = "Standard_NC24s_v3" + STANDARD_NC6 = "Standard_NC6" + STANDARD_NC6_S_V2 = "Standard_NC6s_v2" + STANDARD_NC6_S_V3 = "Standard_NC6s_v3" + STANDARD_ND12_S = "Standard_ND12s" + STANDARD_ND24_RS = "Standard_ND24rs" + STANDARD_ND24_S = "Standard_ND24s" + STANDARD_ND6_S = "Standard_ND6s" + STANDARD_NV12 = "Standard_NV12" + STANDARD_NV24 = "Standard_NV24" + STANDARD_NV6 = "Standard_NV6" + +class Count(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): + """Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The + default value is 1. + """ + + ONE = 1 + THREE = 3 + FIVE = 5 + +class OSType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + """ + + LINUX = "Linux" + WINDOWS = "Windows" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_models.py new file mode 100755 index 00000000000..f4993afd77c --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_models.py @@ -0,0 +1,804 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import msrest.serialization + + +class Resource(msrest.serialization.Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + + +class ContainerService(Resource): + """Container service. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param orchestrator_profile: Profile for the container service orchestrator. + :type orchestrator_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceOrchestratorProfile + :param custom_profile: Properties to configure a custom container service cluster. + :type custom_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceCustomProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef need to be + specified. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServicePrincipalProfile + :param master_profile: Profile for the container service master. + :type master_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceMasterProfile + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceAgentPoolProfile] + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceWindowsProfile + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceLinuxProfile + :param diagnostics_profile: Profile for diagnostics in the container service cluster. + :type diagnostics_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceDiagnosticsProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'orchestrator_profile': {'key': 'properties.orchestratorProfile', 'type': 'ContainerServiceOrchestratorProfile'}, + 'custom_profile': {'key': 'properties.customProfile', 'type': 'ContainerServiceCustomProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServicePrincipalProfile'}, + 'master_profile': {'key': 'properties.masterProfile', 'type': 'ContainerServiceMasterProfile'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ContainerServiceAgentPoolProfile]'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ContainerServiceWindowsProfile'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'ContainerServiceDiagnosticsProfile'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerService, self).__init__(**kwargs) + self.provisioning_state = None + self.orchestrator_profile = kwargs.get('orchestrator_profile', None) + self.custom_profile = kwargs.get('custom_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.master_profile = kwargs.get('master_profile', None) + self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.windows_profile = kwargs.get('windows_profile', None) + self.linux_profile = kwargs.get('linux_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + + +class ContainerServiceAgentPoolProfile(msrest.serialization.Model): + """Profile for the container service agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. + :type name: str + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param dns_prefix: DNS prefix to be used to create the FQDN for the agent pool. + :type dns_prefix: str + :ivar fqdn: FQDN for the agent pool. + :vartype fqdn: str + :param ports: Ports number array used to expose on this agent pool. The default opened ports + are different based on your choice of orchestrator. + :type ports: list[int] + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceStorageProfileTypes + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2017_07_01.models.OSType + """ + + _validation = { + 'name': {'required': True}, + 'count': {'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[int]'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceAgentPoolProfile, self).__init__(**kwargs) + self.name = kwargs['name'] + self.count = kwargs.get('count', 1) + self.vm_size = kwargs['vm_size'] + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.dns_prefix = kwargs.get('dns_prefix', None) + self.fqdn = None + self.ports = kwargs.get('ports', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.os_type = kwargs.get('os_type', "Linux") + + +class ContainerServiceCustomProfile(msrest.serialization.Model): + """Properties to configure a custom container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator: Required. The name of the custom orchestrator to use. + :type orchestrator: str + """ + + _validation = { + 'orchestrator': {'required': True}, + } + + _attribute_map = { + 'orchestrator': {'key': 'orchestrator', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceCustomProfile, self).__init__(**kwargs) + self.orchestrator = kwargs['orchestrator'] + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. + :type vm_diagnostics: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceVMDiagnostics + """ + + _validation = { + 'vm_diagnostics': {'required': True}, + } + + _attribute_map = { + 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) + self.vm_diagnostics = kwargs['vm_diagnostics'] + + +class ContainerServiceLinuxProfile(msrest.serialization.Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Linux VMs. + :type admin_username: str + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceSshConfiguration + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, + 'ssh': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceLinuxProfile, self).__init__(**kwargs) + self.admin_username = kwargs['admin_username'] + self.ssh = kwargs['ssh'] + + +class ContainerServiceListResult(msrest.serialization.Model): + """The response from the List Container Services operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of container services. + :type value: list[~azure.mgmt.containerservice.v2017_07_01.models.ContainerService] + :ivar next_link: The URL to get the next set of container service results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ContainerService]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ContainerServiceMasterProfile(msrest.serialization.Model): + """Profile for the container service master. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2017_07_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. + :type dns_prefix: str + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. + :type first_consecutive_static_ip: str + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + """ + + _validation = { + 'dns_prefix': {'required': True}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceMasterProfile, self).__init__(**kwargs) + self.count = kwargs.get('count', "1") + self.dns_prefix = kwargs['dns_prefix'] + self.vm_size = kwargs['vm_size'] + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") + self.storage_profile = kwargs.get('storage_profile', None) + self.fqdn = None + + +class ContainerServiceOrchestratorProfile(msrest.serialization.Model): + """Profile for the container service orchestrator. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Required. The orchestrator to use to manage container service cluster + resources. Valid values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Possible values + include: "Kubernetes", "Swarm", "DCOS", "DockerCE", "Custom". + :type orchestrator_type: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceOrchestratorTypes + :param orchestrator_version: The version of the orchestrator to use. You can specify the + major.minor.patch part of the actual version.For example, you can specify version as "1.6.11". + :type orchestrator_version: str + """ + + _validation = { + 'orchestrator_type': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceOrchestratorProfile, self).__init__(**kwargs) + self.orchestrator_type = kwargs['orchestrator_type'] + self.orchestrator_version = kwargs.get('orchestrator_version', None) + + +class ContainerServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal in plain text. + :type secret: str + :param key_vault_secret_ref: Reference to a secret stored in Azure Key Vault. + :type key_vault_secret_ref: ~azure.mgmt.containerservice.v2017_07_01.models.KeyVaultSecretRef + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + 'key_vault_secret_ref': {'key': 'keyVaultSecretRef', 'type': 'KeyVaultSecretRef'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = kwargs['client_id'] + self.secret = kwargs.get('secret', None) + self.key_vault_secret_ref = kwargs.get('key_vault_secret_ref', None) + + +class ContainerServiceSshConfiguration(msrest.serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. + :type public_keys: + list[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceSshPublicKey] + """ + + _validation = { + 'public_keys': {'required': True}, + } + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceSshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs['public_keys'] + + +class ContainerServiceSshPublicKey(msrest.serialization.Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. + :type key_data: str + """ + + _validation = { + 'key_data': {'required': True}, + } + + _attribute_map = { + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceSshPublicKey, self).__init__(**kwargs) + self.key_data = kwargs['key_data'] + + +class ContainerServiceVMDiagnostics(msrest.serialization.Model): + """Profile for diagnostics on the container service VMs. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. + :type enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are stored. + :vartype storage_uri: str + """ + + _validation = { + 'enabled': {'required': True}, + 'storage_uri': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.storage_uri = None + + +class ContainerServiceWindowsProfile(msrest.serialization.Model): + """Profile for Windows VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Windows VMs. + :type admin_username: str + :param admin_password: Required. The administrator password to use for Windows VMs. + :type admin_password: str + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$'}, + 'admin_password': {'required': True, 'pattern': r'^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$'}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceWindowsProfile, self).__init__(**kwargs) + self.admin_username = kwargs['admin_username'] + self.admin_password = kwargs['admin_password'] + + +class KeyVaultSecretRef(msrest.serialization.Model): + """Reference to a secret stored in Azure Key Vault. + + All required parameters must be populated in order to send to Azure. + + :param vault_id: Required. Key vault identifier. + :type vault_id: str + :param secret_name: Required. The secret name. + :type secret_name: str + :param version: The secret version. + :type version: str + """ + + _validation = { + 'vault_id': {'required': True}, + 'secret_name': {'required': True}, + } + + _attribute_map = { + 'vault_id': {'key': 'vaultID', 'type': 'str'}, + 'secret_name': {'key': 'secretName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultSecretRef, self).__init__(**kwargs) + self.vault_id = kwargs['vault_id'] + self.secret_name = kwargs['secret_name'] + self.version = kwargs.get('version', None) + + +class OrchestratorProfile(msrest.serialization.Model): + """Contains information about orchestrator. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Orchestrator type. + :type orchestrator_type: str + :param orchestrator_version: Required. Orchestrator version (major, minor, patch). + :type orchestrator_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _validation = { + 'orchestrator_version': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(OrchestratorProfile, self).__init__(**kwargs) + self.orchestrator_type = kwargs.get('orchestrator_type', None) + self.orchestrator_version = kwargs['orchestrator_version'] + self.is_preview = kwargs.get('is_preview', None) + + +class OrchestratorVersionProfile(msrest.serialization.Model): + """The profile of an orchestrator and its available versions. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Required. Orchestrator type. + :type orchestrator_type: str + :param orchestrator_version: Required. Orchestrator version (major, minor, patch). + :type orchestrator_version: str + :param default: Installed by default if version is not specified. + :type default: bool + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + :param upgrades: The list of available upgrade versions. + :type upgrades: list[~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorProfile] + """ + + _validation = { + 'orchestrator_type': {'required': True}, + 'orchestrator_version': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'bool'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'}, + } + + def __init__( + self, + **kwargs + ): + super(OrchestratorVersionProfile, self).__init__(**kwargs) + self.orchestrator_type = kwargs['orchestrator_type'] + self.orchestrator_version = kwargs['orchestrator_version'] + self.default = kwargs.get('default', None) + self.is_preview = kwargs.get('is_preview', None) + self.upgrades = kwargs.get('upgrades', None) + + +class OrchestratorVersionProfileListResult(msrest.serialization.Model): + """The list of versions for supported orchestrators. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Id of the orchestrator version profile list result. + :vartype id: str + :ivar name: Name of the orchestrator version profile list result. + :vartype name: str + :ivar type: Type of the orchestrator version profile list result. + :vartype type: str + :param orchestrators: Required. List of orchestrator version profiles. + :type orchestrators: + list[~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorVersionProfile] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'orchestrators': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'}, + } + + def __init__( + self, + **kwargs + ): + super(OrchestratorVersionProfileListResult, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.orchestrators = kwargs['orchestrators'] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_models_py3.py new file mode 100755 index 00000000000..ee4699aca38 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_models_py3.py @@ -0,0 +1,881 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Dict, List, Optional, Union + +import msrest.serialization + +from ._container_service_client_enums import * + + +class Resource(msrest.serialization.Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ContainerService(Resource): + """Container service. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param orchestrator_profile: Profile for the container service orchestrator. + :type orchestrator_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceOrchestratorProfile + :param custom_profile: Properties to configure a custom container service cluster. + :type custom_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceCustomProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef need to be + specified. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServicePrincipalProfile + :param master_profile: Profile for the container service master. + :type master_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceMasterProfile + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceAgentPoolProfile] + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceWindowsProfile + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceLinuxProfile + :param diagnostics_profile: Profile for diagnostics in the container service cluster. + :type diagnostics_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceDiagnosticsProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'orchestrator_profile': {'key': 'properties.orchestratorProfile', 'type': 'ContainerServiceOrchestratorProfile'}, + 'custom_profile': {'key': 'properties.customProfile', 'type': 'ContainerServiceCustomProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServicePrincipalProfile'}, + 'master_profile': {'key': 'properties.masterProfile', 'type': 'ContainerServiceMasterProfile'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ContainerServiceAgentPoolProfile]'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ContainerServiceWindowsProfile'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'ContainerServiceDiagnosticsProfile'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + orchestrator_profile: Optional["ContainerServiceOrchestratorProfile"] = None, + custom_profile: Optional["ContainerServiceCustomProfile"] = None, + service_principal_profile: Optional["ContainerServicePrincipalProfile"] = None, + master_profile: Optional["ContainerServiceMasterProfile"] = None, + agent_pool_profiles: Optional[List["ContainerServiceAgentPoolProfile"]] = None, + windows_profile: Optional["ContainerServiceWindowsProfile"] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + diagnostics_profile: Optional["ContainerServiceDiagnosticsProfile"] = None, + **kwargs + ): + super(ContainerService, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.orchestrator_profile = orchestrator_profile + self.custom_profile = custom_profile + self.service_principal_profile = service_principal_profile + self.master_profile = master_profile + self.agent_pool_profiles = agent_pool_profiles + self.windows_profile = windows_profile + self.linux_profile = linux_profile + self.diagnostics_profile = diagnostics_profile + + +class ContainerServiceAgentPoolProfile(msrest.serialization.Model): + """Profile for the container service agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. + :type name: str + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param dns_prefix: DNS prefix to be used to create the FQDN for the agent pool. + :type dns_prefix: str + :ivar fqdn: FQDN for the agent pool. + :vartype fqdn: str + :param ports: Ports number array used to expose on this agent pool. The default opened ports + are different based on your choice of orchestrator. + :type ports: list[int] + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceStorageProfileTypes + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2017_07_01.models.OSType + """ + + _validation = { + 'name': {'required': True}, + 'count': {'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[int]'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + count: Optional[int] = 1, + os_disk_size_gb: Optional[int] = None, + dns_prefix: Optional[str] = None, + ports: Optional[List[int]] = None, + storage_profile: Optional[Union[str, "ContainerServiceStorageProfileTypes"]] = None, + vnet_subnet_id: Optional[str] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + **kwargs + ): + super(ContainerServiceAgentPoolProfile, self).__init__(**kwargs) + self.name = name + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.dns_prefix = dns_prefix + self.fqdn = None + self.ports = ports + self.storage_profile = storage_profile + self.vnet_subnet_id = vnet_subnet_id + self.os_type = os_type + + +class ContainerServiceCustomProfile(msrest.serialization.Model): + """Properties to configure a custom container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator: Required. The name of the custom orchestrator to use. + :type orchestrator: str + """ + + _validation = { + 'orchestrator': {'required': True}, + } + + _attribute_map = { + 'orchestrator': {'key': 'orchestrator', 'type': 'str'}, + } + + def __init__( + self, + *, + orchestrator: str, + **kwargs + ): + super(ContainerServiceCustomProfile, self).__init__(**kwargs) + self.orchestrator = orchestrator + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. + :type vm_diagnostics: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceVMDiagnostics + """ + + _validation = { + 'vm_diagnostics': {'required': True}, + } + + _attribute_map = { + 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, + } + + def __init__( + self, + *, + vm_diagnostics: "ContainerServiceVMDiagnostics", + **kwargs + ): + super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) + self.vm_diagnostics = vm_diagnostics + + +class ContainerServiceLinuxProfile(msrest.serialization.Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Linux VMs. + :type admin_username: str + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceSshConfiguration + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, + 'ssh': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, + } + + def __init__( + self, + *, + admin_username: str, + ssh: "ContainerServiceSshConfiguration", + **kwargs + ): + super(ContainerServiceLinuxProfile, self).__init__(**kwargs) + self.admin_username = admin_username + self.ssh = ssh + + +class ContainerServiceListResult(msrest.serialization.Model): + """The response from the List Container Services operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of container services. + :type value: list[~azure.mgmt.containerservice.v2017_07_01.models.ContainerService] + :ivar next_link: The URL to get the next set of container service results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ContainerService]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ContainerService"]] = None, + **kwargs + ): + super(ContainerServiceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ContainerServiceMasterProfile(msrest.serialization.Model): + """Profile for the container service master. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2017_07_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. + :type dns_prefix: str + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. + :type first_consecutive_static_ip: str + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + """ + + _validation = { + 'dns_prefix': {'required': True}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__( + self, + *, + dns_prefix: str, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + count: Optional[Union[int, "Count"]] = "1", + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + first_consecutive_static_ip: Optional[str] = "10.240.255.5", + storage_profile: Optional[Union[str, "ContainerServiceStorageProfileTypes"]] = None, + **kwargs + ): + super(ContainerServiceMasterProfile, self).__init__(**kwargs) + self.count = count + self.dns_prefix = dns_prefix + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.vnet_subnet_id = vnet_subnet_id + self.first_consecutive_static_ip = first_consecutive_static_ip + self.storage_profile = storage_profile + self.fqdn = None + + +class ContainerServiceOrchestratorProfile(msrest.serialization.Model): + """Profile for the container service orchestrator. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Required. The orchestrator to use to manage container service cluster + resources. Valid values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Possible values + include: "Kubernetes", "Swarm", "DCOS", "DockerCE", "Custom". + :type orchestrator_type: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceOrchestratorTypes + :param orchestrator_version: The version of the orchestrator to use. You can specify the + major.minor.patch part of the actual version.For example, you can specify version as "1.6.11". + :type orchestrator_version: str + """ + + _validation = { + 'orchestrator_type': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + orchestrator_type: Union[str, "ContainerServiceOrchestratorTypes"], + orchestrator_version: Optional[str] = None, + **kwargs + ): + super(ContainerServiceOrchestratorProfile, self).__init__(**kwargs) + self.orchestrator_type = orchestrator_type + self.orchestrator_version = orchestrator_version + + +class ContainerServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal in plain text. + :type secret: str + :param key_vault_secret_ref: Reference to a secret stored in Azure Key Vault. + :type key_vault_secret_ref: ~azure.mgmt.containerservice.v2017_07_01.models.KeyVaultSecretRef + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + 'key_vault_secret_ref': {'key': 'keyVaultSecretRef', 'type': 'KeyVaultSecretRef'}, + } + + def __init__( + self, + *, + client_id: str, + secret: Optional[str] = None, + key_vault_secret_ref: Optional["KeyVaultSecretRef"] = None, + **kwargs + ): + super(ContainerServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = client_id + self.secret = secret + self.key_vault_secret_ref = key_vault_secret_ref + + +class ContainerServiceSshConfiguration(msrest.serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. + :type public_keys: + list[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceSshPublicKey] + """ + + _validation = { + 'public_keys': {'required': True}, + } + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, + } + + def __init__( + self, + *, + public_keys: List["ContainerServiceSshPublicKey"], + **kwargs + ): + super(ContainerServiceSshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class ContainerServiceSshPublicKey(msrest.serialization.Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. + :type key_data: str + """ + + _validation = { + 'key_data': {'required': True}, + } + + _attribute_map = { + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__( + self, + *, + key_data: str, + **kwargs + ): + super(ContainerServiceSshPublicKey, self).__init__(**kwargs) + self.key_data = key_data + + +class ContainerServiceVMDiagnostics(msrest.serialization.Model): + """Profile for diagnostics on the container service VMs. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. + :type enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are stored. + :vartype storage_uri: str + """ + + _validation = { + 'enabled': {'required': True}, + 'storage_uri': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__( + self, + *, + enabled: bool, + **kwargs + ): + super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = None + + +class ContainerServiceWindowsProfile(msrest.serialization.Model): + """Profile for Windows VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Windows VMs. + :type admin_username: str + :param admin_password: Required. The administrator password to use for Windows VMs. + :type admin_password: str + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$'}, + 'admin_password': {'required': True, 'pattern': r'^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$'}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + } + + def __init__( + self, + *, + admin_username: str, + admin_password: str, + **kwargs + ): + super(ContainerServiceWindowsProfile, self).__init__(**kwargs) + self.admin_username = admin_username + self.admin_password = admin_password + + +class KeyVaultSecretRef(msrest.serialization.Model): + """Reference to a secret stored in Azure Key Vault. + + All required parameters must be populated in order to send to Azure. + + :param vault_id: Required. Key vault identifier. + :type vault_id: str + :param secret_name: Required. The secret name. + :type secret_name: str + :param version: The secret version. + :type version: str + """ + + _validation = { + 'vault_id': {'required': True}, + 'secret_name': {'required': True}, + } + + _attribute_map = { + 'vault_id': {'key': 'vaultID', 'type': 'str'}, + 'secret_name': {'key': 'secretName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + *, + vault_id: str, + secret_name: str, + version: Optional[str] = None, + **kwargs + ): + super(KeyVaultSecretRef, self).__init__(**kwargs) + self.vault_id = vault_id + self.secret_name = secret_name + self.version = version + + +class OrchestratorProfile(msrest.serialization.Model): + """Contains information about orchestrator. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Orchestrator type. + :type orchestrator_type: str + :param orchestrator_version: Required. Orchestrator version (major, minor, patch). + :type orchestrator_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _validation = { + 'orchestrator_version': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + *, + orchestrator_version: str, + orchestrator_type: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): + super(OrchestratorProfile, self).__init__(**kwargs) + self.orchestrator_type = orchestrator_type + self.orchestrator_version = orchestrator_version + self.is_preview = is_preview + + +class OrchestratorVersionProfile(msrest.serialization.Model): + """The profile of an orchestrator and its available versions. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Required. Orchestrator type. + :type orchestrator_type: str + :param orchestrator_version: Required. Orchestrator version (major, minor, patch). + :type orchestrator_version: str + :param default: Installed by default if version is not specified. + :type default: bool + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + :param upgrades: The list of available upgrade versions. + :type upgrades: list[~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorProfile] + """ + + _validation = { + 'orchestrator_type': {'required': True}, + 'orchestrator_version': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'bool'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'}, + } + + def __init__( + self, + *, + orchestrator_type: str, + orchestrator_version: str, + default: Optional[bool] = None, + is_preview: Optional[bool] = None, + upgrades: Optional[List["OrchestratorProfile"]] = None, + **kwargs + ): + super(OrchestratorVersionProfile, self).__init__(**kwargs) + self.orchestrator_type = orchestrator_type + self.orchestrator_version = orchestrator_version + self.default = default + self.is_preview = is_preview + self.upgrades = upgrades + + +class OrchestratorVersionProfileListResult(msrest.serialization.Model): + """The list of versions for supported orchestrators. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Id of the orchestrator version profile list result. + :vartype id: str + :ivar name: Name of the orchestrator version profile list result. + :vartype name: str + :ivar type: Type of the orchestrator version profile list result. + :vartype type: str + :param orchestrators: Required. List of orchestrator version profiles. + :type orchestrators: + list[~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorVersionProfile] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'orchestrators': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'}, + } + + def __init__( + self, + *, + orchestrators: List["OrchestratorVersionProfile"], + **kwargs + ): + super(OrchestratorVersionProfileListResult, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.orchestrators = orchestrators diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/operations/__init__.py new file mode 100755 index 00000000000..db0e90a3a5a --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/operations/__init__.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_services_operations import ContainerServicesOperations + +__all__ = [ + 'ContainerServicesOperations', +] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/operations/_container_services_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/operations/_container_services_operations.py new file mode 100755 index 00000000000..93392d039d2 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/operations/_container_services_operations.py @@ -0,0 +1,573 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ContainerServicesOperations(object): + """ContainerServicesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2017_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ContainerServiceListResult"] + """Gets a list of container services in the specified subscription. + + Gets a list of container services in the specified subscription. The operation returns + properties of each container service including state, orchestrator, number of masters and + agents, and FQDNs of masters and agents. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ContainerServiceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ContainerServiceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + container_service_name, # type: str + parameters, # type: "_models.ContainerService" + **kwargs # type: Any + ): + # type: (...) -> "_models.ContainerService" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ContainerService') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ContainerService', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ContainerService', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ContainerService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + container_service_name, # type: str + parameters, # type: "_models.ContainerService" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ContainerService"] + """Creates or updates a container service. + + Creates or updates a container service with the specified configuration of orchestrator, + masters, and agents. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_service_name: The name of the container service in the specified subscription + and resource group. + :type container_service_name: str + :param parameters: Parameters supplied to the Create or Update a Container Service operation. + :type parameters: ~azure.mgmt.containerservice.v2017_07_01.models.ContainerService + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ContainerService or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2017_07_01.models.ContainerService] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerService"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + container_service_name=container_service_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ContainerService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + container_service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ContainerService" + """Gets the properties of the specified container service. + + Gets the properties of the specified container service in the specified subscription and + resource group. The operation returns the properties including state, orchestrator, number of + masters and agents, and FQDNs of masters and agents. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_service_name: The name of the container service in the specified subscription + and resource group. + :type container_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ContainerService, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2017_07_01.models.ContainerService + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ContainerService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + container_service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + container_service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified container service. + + Deletes the specified container service in the specified subscription and resource group. The + operation does not delete other resources created as part of creating a container service, + including storage accounts, VMs, and availability sets. All the other resources created with + the container service are part of the same resource group and can be deleted individually. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_service_name: The name of the container service in the specified subscription + and resource group. + :type container_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + container_service_name=container_service_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ContainerServiceListResult"] + """Gets a list of container services in the specified resource group. + + Gets a list of container services in the specified subscription and resource group. The + operation returns properties of each container service including state, orchestrator, number of + masters and agents, and FQDNs of masters and agents. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ContainerServiceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ContainerServiceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices'} # type: ignore + + def list_orchestrators( + self, + location, # type: str + resource_type=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.OrchestratorVersionProfileListResult" + """Gets a list of supported orchestrators in the specified subscription. + + Gets a list of supported orchestrators in the specified subscription. The operation returns + properties of each orchestrator including version, available upgrades and whether that version + or upgrades are in preview. + + :param location: The name of a supported Azure region. + :type location: str + :param resource_type: resource type for which the list of orchestrators needs to be returned. + :type resource_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OrchestratorVersionProfileListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorVersionProfileListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrchestratorVersionProfileListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.list_orchestrators.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if resource_type is not None: + query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OrchestratorVersionProfileListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_orchestrators.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/__init__.py deleted file mode 100644 index 9854e4f7645..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_service_client import ContainerServiceClient -from .version import VERSION - -__all__ = ['ContainerServiceClient'] - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/container_service_client.py deleted file mode 100644 index c10bfe67196..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/container_service_client.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.managed_clusters_operations import ManagedClustersOperations -from . import models - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2018_08_01_preview.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2018_08_01_preview.operations.ManagedClustersOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-08-01-preview' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/__init__.py deleted file mode 100644 index b130d1e5eff..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/__init__.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from .operation_value_py3 import OperationValue - from .resource_py3 import Resource - from .tags_object_py3 import TagsObject - from .managed_cluster_service_principal_profile_py3 import ManagedClusterServicePrincipalProfile - from .container_service_master_profile_py3 import ContainerServiceMasterProfile - from .managed_cluster_agent_pool_profile_py3 import ManagedClusterAgentPoolProfile - from .container_service_windows_profile_py3 import ContainerServiceWindowsProfile - from .container_service_ssh_public_key_py3 import ContainerServiceSshPublicKey - from .container_service_ssh_configuration_py3 import ContainerServiceSshConfiguration - from .container_service_linux_profile_py3 import ContainerServiceLinuxProfile - from .container_service_network_profile_py3 import ContainerServiceNetworkProfile - from .container_service_vm_diagnostics_py3 import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile_py3 import ContainerServiceDiagnosticsProfile - from .managed_cluster_addon_profile_py3 import ManagedClusterAddonProfile - from .managed_cluster_aad_profile_py3 import ManagedClusterAADProfile - from .managed_cluster_py3 import ManagedCluster - from .orchestrator_profile_py3 import OrchestratorProfile - from .managed_cluster_access_profile_py3 import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile_py3 import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile_py3 import ManagedClusterUpgradeProfile - from .credential_result_py3 import CredentialResult - from .credential_results_py3 import CredentialResults -except (SyntaxError, ImportError): - from .operation_value import OperationValue - from .resource import Resource - from .tags_object import TagsObject - from .managed_cluster_service_principal_profile import ManagedClusterServicePrincipalProfile - from .container_service_master_profile import ContainerServiceMasterProfile - from .managed_cluster_agent_pool_profile import ManagedClusterAgentPoolProfile - from .container_service_windows_profile import ContainerServiceWindowsProfile - from .container_service_ssh_public_key import ContainerServiceSshPublicKey - from .container_service_ssh_configuration import ContainerServiceSshConfiguration - from .container_service_linux_profile import ContainerServiceLinuxProfile - from .container_service_network_profile import ContainerServiceNetworkProfile - from .container_service_vm_diagnostics import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile import ContainerServiceDiagnosticsProfile - from .managed_cluster_addon_profile import ManagedClusterAddonProfile - from .managed_cluster_aad_profile import ManagedClusterAADProfile - from .managed_cluster import ManagedCluster - from .orchestrator_profile import OrchestratorProfile - from .managed_cluster_access_profile import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile import ManagedClusterUpgradeProfile - from .credential_result import CredentialResult - from .credential_results import CredentialResults -from .operation_value_paged import OperationValuePaged -from .managed_cluster_paged import ManagedClusterPaged -from .container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - NetworkPlugin, - NetworkPolicy, -) - -__all__ = [ - 'OperationValue', - 'Resource', - 'TagsObject', - 'ManagedClusterServicePrincipalProfile', - 'ContainerServiceMasterProfile', - 'ManagedClusterAgentPoolProfile', - 'ContainerServiceWindowsProfile', - 'ContainerServiceSshPublicKey', - 'ContainerServiceSshConfiguration', - 'ContainerServiceLinuxProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceVMDiagnostics', - 'ContainerServiceDiagnosticsProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAADProfile', - 'ManagedCluster', - 'OrchestratorProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterUpgradeProfile', - 'CredentialResult', - 'CredentialResults', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'NetworkPlugin', - 'NetworkPolicy', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_client_enums.py deleted file mode 100644 index f6d7bf60bf4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_client_enums.py +++ /dev/null @@ -1,219 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_diagnostics_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_diagnostics_profile.py deleted file mode 100644 index f972906b79f..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_diagnostics_profile.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_diagnostics_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_diagnostics_profile_py3.py deleted file mode 100644 index 6684912319a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_diagnostics_profile_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_linux_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_linux_profile.py deleted file mode 100644 index 8143d72a672..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_linux_profile.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_linux_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_linux_profile_py3.py deleted file mode 100644 index e1fc61c8914..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_linux_profile_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_master_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_master_profile.py deleted file mode 100644 index 927a55304d0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_master_profile.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_master_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_master_profile_py3.py deleted file mode 100644 index 215e111082b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_master_profile_py3.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_network_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_network_profile.py deleted file mode 100644 index d1be0f459ac..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_network_profile.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico' - :type network_policy: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_network_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_network_profile_py3.py deleted file mode 100644 index e00659a9df5..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_network_profile_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico' - :type network_policy: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_configuration.py deleted file mode 100644 index 936c49ab349..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_configuration.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_configuration_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_configuration_py3.py deleted file mode 100644 index 86e22820dbf..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_configuration_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_public_key.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_public_key.py deleted file mode 100644 index da7609ba222..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_public_key.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_public_key_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_public_key_py3.py deleted file mode 100644 index 8e8c10544ef..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_public_key_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_vm_diagnostics.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_vm_diagnostics.py deleted file mode 100644 index f1804c66b68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_vm_diagnostics.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_vm_diagnostics_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_vm_diagnostics_py3.py deleted file mode 100644 index a716fc26954..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_vm_diagnostics_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_windows_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_windows_profile.py deleted file mode 100644 index 463253c6d6a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_windows_profile.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: Required. The administrator password to use for - Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$'}, - 'admin_password': {'required': True, 'pattern': r'^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$'}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_windows_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_windows_profile_py3.py deleted file mode 100644 index 667c96367aa..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_windows_profile_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: Required. The administrator password to use for - Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$'}, - 'admin_password': {'required': True, 'pattern': r'^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$'}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str, **kwargs) -> None: - super(ContainerServiceWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_result.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_result.py deleted file mode 100644 index 89e748b481b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_result.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(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 diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_result_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_result_py3.py deleted file mode 100644 index 6f387834bf0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_result_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_results.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_results.py deleted file mode 100644 index 2d6869b53be..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_results.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_results_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_results_py3.py deleted file mode 100644 index a1d0853e0de..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_results_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster.py deleted file mode 100644 index 8864f98b7a6..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceLinuxProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAddonProfile] - :ivar node_resource_group: Name of the resource group containing agent - pool nodes. - :vartype node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAADProfile - :param api_server_authorized_ip_ranges: Authorized IP Ranges to kubernetes - API server. - :type api_server_authorized_ip_ranges: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'node_resource_group': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = None - self.enable_rbac = kwargs.get('enable_rbac', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.api_server_authorized_ip_ranges = kwargs.get('api_server_authorized_ip_ranges', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_aad_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_aad_profile.py deleted file mode 100644 index 6a48639de34..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_aad_profile.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_aad_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_aad_profile_py3.py deleted file mode 100644 index 76289f3ddc3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_aad_profile_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_access_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_access_profile.py deleted file mode 100644 index 6dc2a4ec23b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_access_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_access_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_access_profile_py3.py deleted file mode 100644 index 0d3fb998e97..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_access_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_addon_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_addon_profile.py deleted file mode 100644 index 796f9246a68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_addon_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_addon_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_addon_profile_py3.py deleted file mode 100644 index 71e05cd14c0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_addon_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_agent_pool_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_agent_pool_profile.py deleted file mode 100644 index de4cb740d6c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_agent_pool_profile.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfile(Model): - """Profile for the container service agent pool. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.AgentPoolType - """ - - _validation = { - 'name': {'required': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_agent_pool_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_agent_pool_profile_py3.py deleted file mode 100644 index 46a260aa73c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_agent_pool_profile_py3.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfile(Model): - """Profile for the container service agent pool. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.AgentPoolType - """ - - _validation = { - 'name': {'required': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = name - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_paged.py deleted file mode 100644 index 3e57bbc42ec..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_pool_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_pool_upgrade_profile.py deleted file mode 100644 index 988132b10b4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_pool_upgrade_profile.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: list[str] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_pool_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_pool_upgrade_profile_py3.py deleted file mode 100644 index 9eae9ae9fed..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_pool_upgrade_profile_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: list[str] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[str]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_py3.py deleted file mode 100644 index 04d1589d118..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_py3.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceLinuxProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAddonProfile] - :ivar node_resource_group: Name of the resource group containing agent - pool nodes. - :vartype node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAADProfile - :param api_server_authorized_ip_ranges: Authorized IP Ranges to kubernetes - API server. - :type api_server_authorized_ip_ranges: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'node_resource_group': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, service_principal_profile=None, addon_profiles=None, enable_rbac: bool=None, network_profile=None, aad_profile=None, api_server_authorized_ip_ranges=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = None - self.enable_rbac = enable_rbac - self.network_profile = network_profile - self.aad_profile = aad_profile - self.api_server_authorized_ip_ranges = api_server_authorized_ip_ranges diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_service_principal_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_service_principal_profile.py deleted file mode 100644 index 4610cedac54..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_service_principal_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_service_principal_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_service_principal_profile_py3.py deleted file mode 100644 index 6ea9e92dc40..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_service_principal_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_upgrade_profile.py deleted file mode 100644 index b4a98f4cd2a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_upgrade_profile.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_upgrade_profile_py3.py deleted file mode 100644 index bed444fa378..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_upgrade_profile_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value.py deleted file mode 100644 index 911f9fc8088..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value_paged.py deleted file mode 100644 index 47310584f24..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value_py3.py deleted file mode 100644 index 55bceaa7543..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/orchestrator_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/orchestrator_profile.py deleted file mode 100644 index d5560a1f879..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/orchestrator_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = kwargs.get('orchestrator_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/orchestrator_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/orchestrator_profile_py3.py deleted file mode 100644 index f16e84a1fe3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/orchestrator_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, *, orchestrator_type: str, orchestrator_version: str, **kwargs) -> None: - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/resource.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/resource.py deleted file mode 100644 index 5dd7d481c68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/resource_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/resource_py3.py deleted file mode 100644 index 2f3702caf60..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/tags_object.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/tags_object.py deleted file mode 100644 index 2966ec220f9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/tags_object.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/tags_object_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/tags_object_py3.py deleted file mode 100644 index 8be0bb4a15d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/tags_object_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/__init__.py deleted file mode 100644 index f517d730f21..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .operations import Operations -from .managed_clusters_operations import ManagedClustersOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/managed_clusters_operations.py deleted file mode 100644 index d85b2f9f178..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/managed_clusters_operations.py +++ /dev/null @@ -1,988 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-08-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-08-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.CredentialResults - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.CredentialResults - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/operations.py deleted file mode 100644 index 513e518a911..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-08-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-08-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.OperationValuePaged[~azure.mgmt.containerservice.v2018_08_01_preview.models.OperationValue] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/__init__.py deleted file mode 100644 index 9854e4f7645..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_service_client import ContainerServiceClient -from .version import VERSION - -__all__ = ['ContainerServiceClient'] - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/container_service_client.py deleted file mode 100644 index 1560293fc87..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/container_service_client.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.managed_clusters_operations import ManagedClustersOperations -from .operations.agent_pools_operations import AgentPoolsOperations -from . import models - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2019_04_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2019_04_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2019_04_01.operations.AgentPoolsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-04-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/__init__.py deleted file mode 100644 index 39f5b2a8516..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/__init__.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from .operation_value_py3 import OperationValue - from .resource_py3 import Resource - from .sub_resource_py3 import SubResource - from .tags_object_py3 import TagsObject - from .managed_cluster_service_principal_profile_py3 import ManagedClusterServicePrincipalProfile - from .container_service_master_profile_py3 import ContainerServiceMasterProfile - from .managed_cluster_agent_pool_profile_properties_py3 import ManagedClusterAgentPoolProfileProperties - from .managed_cluster_agent_pool_profile_py3 import ManagedClusterAgentPoolProfile - from .agent_pool_py3 import AgentPool - from .container_service_windows_profile_py3 import ContainerServiceWindowsProfile - from .container_service_ssh_public_key_py3 import ContainerServiceSshPublicKey - from .container_service_ssh_configuration_py3 import ContainerServiceSshConfiguration - from .container_service_linux_profile_py3 import ContainerServiceLinuxProfile - from .container_service_network_profile_py3 import ContainerServiceNetworkProfile - from .container_service_vm_diagnostics_py3 import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile_py3 import ContainerServiceDiagnosticsProfile - from .managed_cluster_addon_profile_py3 import ManagedClusterAddonProfile - from .managed_cluster_aad_profile_py3 import ManagedClusterAADProfile - from .managed_cluster_py3 import ManagedCluster - from .orchestrator_profile_py3 import OrchestratorProfile - from .managed_cluster_access_profile_py3 import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile_py3 import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile_py3 import ManagedClusterUpgradeProfile - from .credential_result_py3 import CredentialResult - from .credential_results_py3 import CredentialResults -except (SyntaxError, ImportError): - from .operation_value import OperationValue - from .resource import Resource - from .sub_resource import SubResource - from .tags_object import TagsObject - from .managed_cluster_service_principal_profile import ManagedClusterServicePrincipalProfile - from .container_service_master_profile import ContainerServiceMasterProfile - from .managed_cluster_agent_pool_profile_properties import ManagedClusterAgentPoolProfileProperties - from .managed_cluster_agent_pool_profile import ManagedClusterAgentPoolProfile - from .agent_pool import AgentPool - from .container_service_windows_profile import ContainerServiceWindowsProfile - from .container_service_ssh_public_key import ContainerServiceSshPublicKey - from .container_service_ssh_configuration import ContainerServiceSshConfiguration - from .container_service_linux_profile import ContainerServiceLinuxProfile - from .container_service_network_profile import ContainerServiceNetworkProfile - from .container_service_vm_diagnostics import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile import ContainerServiceDiagnosticsProfile - from .managed_cluster_addon_profile import ManagedClusterAddonProfile - from .managed_cluster_aad_profile import ManagedClusterAADProfile - from .managed_cluster import ManagedCluster - from .orchestrator_profile import OrchestratorProfile - from .managed_cluster_access_profile import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile import ManagedClusterUpgradeProfile - from .credential_result import CredentialResult - from .credential_results import CredentialResults -from .operation_value_paged import OperationValuePaged -from .managed_cluster_paged import ManagedClusterPaged -from .agent_pool_paged import AgentPoolPaged -from .container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - NetworkPlugin, - NetworkPolicy, -) - -__all__ = [ - 'OperationValue', - 'Resource', - 'SubResource', - 'TagsObject', - 'ManagedClusterServicePrincipalProfile', - 'ContainerServiceMasterProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAgentPoolProfile', - 'AgentPool', - 'ContainerServiceWindowsProfile', - 'ContainerServiceSshPublicKey', - 'ContainerServiceSshConfiguration', - 'ContainerServiceLinuxProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceVMDiagnostics', - 'ContainerServiceDiagnosticsProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAADProfile', - 'ManagedCluster', - 'OrchestratorProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterUpgradeProfile', - 'CredentialResult', - 'CredentialResults', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'NetworkPlugin', - 'NetworkPolicy', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool.py deleted file mode 100644 index 1f69e099917..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool_paged.py deleted file mode 100644 index 735676ae6cd..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool_py3.py deleted file mode 100644 index 02b032048bd..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool_py3.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, orchestrator_version: str=None, availability_zones=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_client_enums.py deleted file mode 100644 index f317ac627e8..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_client_enums.py +++ /dev/null @@ -1,220 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_diagnostics_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_diagnostics_profile.py deleted file mode 100644 index 37bbead4059..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_diagnostics_profile.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_diagnostics_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_diagnostics_profile_py3.py deleted file mode 100644 index 4ea399e1f99..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_diagnostics_profile_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_linux_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_linux_profile.py deleted file mode 100644 index 012838eb379..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_linux_profile.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_linux_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_linux_profile_py3.py deleted file mode 100644 index 26a9774253c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_linux_profile_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_master_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_master_profile.py deleted file mode 100644 index ea2d38fc6c0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_master_profile.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_master_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_master_profile_py3.py deleted file mode 100644 index d8171032206..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_master_profile_py3.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_network_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_network_profile.py deleted file mode 100644 index 76b392f717a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_network_profile.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_02_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_02_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_network_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_network_profile_py3.py deleted file mode 100644 index be9c2df79d8..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_network_profile_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_02_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_02_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_configuration.py deleted file mode 100644 index 540b259c4df..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_configuration.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_configuration_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_configuration_py3.py deleted file mode 100644 index 4e33bee7e14..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_configuration_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_public_key.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_public_key.py deleted file mode 100644 index da7609ba222..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_public_key.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_public_key_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_public_key_py3.py deleted file mode 100644 index 8e8c10544ef..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_public_key_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_vm_diagnostics.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_vm_diagnostics.py deleted file mode 100644 index f1804c66b68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_vm_diagnostics.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_vm_diagnostics_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_vm_diagnostics_py3.py deleted file mode 100644 index a716fc26954..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_vm_diagnostics_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_windows_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_windows_profile.py deleted file mode 100644 index 463253c6d6a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_windows_profile.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: Required. The administrator password to use for - Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$'}, - 'admin_password': {'required': True, 'pattern': r'^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$'}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_windows_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_windows_profile_py3.py deleted file mode 100644 index 667c96367aa..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_windows_profile_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: Required. The administrator password to use for - Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$'}, - 'admin_password': {'required': True, 'pattern': r'^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$'}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str, **kwargs) -> None: - super(ContainerServiceWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_result.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_result.py deleted file mode 100644 index 89e748b481b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_result.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(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 diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_result_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_result_py3.py deleted file mode 100644 index 6f387834bf0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_result_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_results.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_results.py deleted file mode 100644 index 274a4df3b8f..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_results.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_02_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_results_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_results_py3.py deleted file mode 100644 index 7cab1b12c0d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_results_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_02_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster.py deleted file mode 100644 index c12c487ee22..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceLinuxProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAddonProfile] - :ivar node_resource_group: Name of the resource group containing agent - pool nodes. - :vartype node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAADProfile - :param api_server_authorized_ip_ranges: (PREVIEW) Authorized IP Ranges to - kubernetes API server. - :type api_server_authorized_ip_ranges: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'node_resource_group': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = None - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.api_server_authorized_ip_ranges = kwargs.get('api_server_authorized_ip_ranges', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_aad_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_aad_profile.py deleted file mode 100644 index 6a48639de34..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_aad_profile.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_aad_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_aad_profile_py3.py deleted file mode 100644 index 76289f3ddc3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_aad_profile_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_access_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_access_profile.py deleted file mode 100644 index 6dc2a4ec23b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_access_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_access_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_access_profile_py3.py deleted file mode 100644 index 0d3fb998e97..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_access_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_addon_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_addon_profile.py deleted file mode 100644 index 796f9246a68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_addon_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_addon_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_addon_profile_py3.py deleted file mode 100644 index 71e05cd14c0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_addon_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile.py deleted file mode 100644 index e4c698b89b9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .managed_cluster_agent_pool_profile_properties import ManagedClusterAgentPoolProfileProperties - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_properties.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_properties.py deleted file mode 100644 index 89b53b327f3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_properties.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_properties_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_properties_py3.py deleted file mode 100644 index 62998e7567c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_properties_py3.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_py3.py deleted file mode 100644 index ce5c18a44c4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_py3.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .managed_cluster_agent_pool_profile_properties_py3 import ManagedClusterAgentPoolProfileProperties - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, orchestrator_version=orchestrator_version, availability_zones=availability_zones, **kwargs) - self.name = name diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_paged.py deleted file mode 100644 index e5101f5ce01..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_pool_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_pool_upgrade_profile.py deleted file mode 100644 index 2bbb3b98c17..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_pool_upgrade_profile.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: list[str] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_pool_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_pool_upgrade_profile_py3.py deleted file mode 100644 index a15ac63f436..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_pool_upgrade_profile_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: list[str] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[str]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_py3.py deleted file mode 100644 index 1c8a3919a80..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_py3.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceLinuxProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAddonProfile] - :ivar node_resource_group: Name of the resource group containing agent - pool nodes. - :vartype node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAADProfile - :param api_server_authorized_ip_ranges: (PREVIEW) Authorized IP Ranges to - kubernetes API server. - :type api_server_authorized_ip_ranges: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'node_resource_group': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, service_principal_profile=None, addon_profiles=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, api_server_authorized_ip_ranges=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = None - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.api_server_authorized_ip_ranges = api_server_authorized_ip_ranges diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_service_principal_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_service_principal_profile.py deleted file mode 100644 index 4610cedac54..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_service_principal_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_service_principal_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_service_principal_profile_py3.py deleted file mode 100644 index 6ea9e92dc40..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_service_principal_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_upgrade_profile.py deleted file mode 100644 index 6123fe02156..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_upgrade_profile.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_upgrade_profile_py3.py deleted file mode 100644 index 5e9cc664a75..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_upgrade_profile_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value.py deleted file mode 100644 index 911f9fc8088..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value_paged.py deleted file mode 100644 index 54db1b44228..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value_py3.py deleted file mode 100644 index 55bceaa7543..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/orchestrator_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/orchestrator_profile.py deleted file mode 100644 index d5560a1f879..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/orchestrator_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = kwargs.get('orchestrator_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/orchestrator_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/orchestrator_profile_py3.py deleted file mode 100644 index f16e84a1fe3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/orchestrator_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, *, orchestrator_type: str, orchestrator_version: str, **kwargs) -> None: - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/resource.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/resource.py deleted file mode 100644 index 5dd7d481c68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/resource_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/resource_py3.py deleted file mode 100644 index 2f3702caf60..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/sub_resource.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/sub_resource.py deleted file mode 100644 index a3f389ba0ba..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/sub_resource.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/sub_resource_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/sub_resource_py3.py deleted file mode 100644 index 9d61511ee2a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/sub_resource_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/tags_object.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/tags_object.py deleted file mode 100644 index 2966ec220f9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/tags_object.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/tags_object_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/tags_object_py3.py deleted file mode 100644 index 8be0bb4a15d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/tags_object_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/__init__.py deleted file mode 100644 index b816a99cda0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .operations import Operations -from .managed_clusters_operations import ManagedClustersOperations -from .agent_pools_operations import AgentPoolsOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/agent_pools_operations.py deleted file mode 100644 index 6fd94184fc3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/agent_pools_operations.py +++ /dev/null @@ -1,376 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-02-01" - - self.config = config - - def list( - self, resource_group_name, managed_cluster_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2019_02_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools'} - - def get( - self, resource_group_name, managed_cluster_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_02_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_02_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_02_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - managed_cluster_name=managed_cluster_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, managed_cluster_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, managed_cluster_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - managed_cluster_name=managed_cluster_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/managed_clusters_operations.py deleted file mode 100644 index f9e187d35e9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/managed_clusters_operations.py +++ /dev/null @@ -1,987 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/operations.py deleted file mode 100644 index 595c131971c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2019_02_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/__init__.py old mode 100644 new mode 100755 index 9854e4f7645..eb3d7ba7a26 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/__init__.py @@ -1,18 +1,16 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from .container_service_client import ContainerServiceClient -from .version import VERSION - +from ._container_service_client import ContainerServiceClient __all__ = ['ContainerServiceClient'] -__version__ = VERSION - +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/_configuration.py new file mode 100755 index 00000000000..838d4fe4a5c --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/_configuration.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2019-04-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/_container_service_client.py new file mode 100755 index 00000000000..22aedc7879c --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/_container_service_client.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import ContainerServiceClientConfiguration +from .operations import Operations +from .operations import ManagedClustersOperations +from .operations import AgentPoolsOperations +from . import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2019_04_01.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: azure.mgmt.containerservice.v2019_04_01.operations.ManagedClustersOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: azure.mgmt.containerservice.v2019_04_01.operations.AgentPoolsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.agent_pools = AgentPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> ContainerServiceClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/__init__.py old mode 100644 new mode 100755 similarity index 73% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/version.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/__init__.py index fe4b0545122..4ad2bb20096 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/version.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/__init__.py @@ -1,13 +1,10 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2019-04-01" - +from ._container_service_client import ContainerServiceClient +__all__ = ['ContainerServiceClient'] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/_configuration.py new file mode 100755 index 00000000000..6e83b5c7716 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/_configuration.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2019-04-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/_container_service_client.py new file mode 100755 index 00000000000..d5378ac4cf3 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/_container_service_client.py @@ -0,0 +1,92 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import ContainerServiceClientConfiguration +from .operations import Operations +from .operations import ManagedClustersOperations +from .operations import AgentPoolsOperations +from .. import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2019_04_01.aio.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: azure.mgmt.containerservice.v2019_04_01.aio.operations.ManagedClustersOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: azure.mgmt.containerservice.v2019_04_01.aio.operations.AgentPoolsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.agent_pools = AgentPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ContainerServiceClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/__init__.py old mode 100644 new mode 100755 similarity index 92% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/__init__.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/__init__.py index d1b67f7888b..5aac40228ee --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/__init__.py @@ -1,12 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._operations import Operations diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_agent_pools_operations.py new file mode 100755 index 00000000000..b6f289badc9 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_agent_pools_operations.py @@ -0,0 +1,439 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AgentPoolsOperations: + """AgentPoolsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2019_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AgentPoolListResult"]: + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. The operation returns properties + of each agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> "_models.AgentPool": + """Gets the agent pool. + + Gets the details of the agent pool by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.AgentPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", + **kwargs: Any + ) -> "_models.AgentPool": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AgentPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", + **kwargs: Any + ) -> AsyncLROPoller["_models.AgentPool"]: + """Creates or updates an agent pool. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :param parameters: Parameters supplied to the Create or Update an agent pool operation. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.AgentPool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an agent pool. + + Deletes the agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_managed_clusters_operations.py new file mode 100755 index 00000000000..270cecf7d03 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_managed_clusters_operations.py @@ -0,0 +1,1101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ManagedClustersOperations: + """ManagedClustersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2019_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. The operation returns properties + of each managed cluster. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. The operation returns + properties of each managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + async def get_upgrade_profile( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.ManagedClusterUpgradeProfile": + """Gets upgrade profile for a managed cluster. + + Gets the details of the upgrade profile for a managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore + + async def get_access_profile( + self, + resource_group_name: str, + resource_name: str, + role_name: str, + **kwargs: Any + ) -> "_models.ManagedClusterAccessProfile": + """Gets an access profile of a managed cluster. + + Gets the accessProfile for the specified role name of the managed cluster with a specified + resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get_access_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore + + async def list_cluster_admin_credentials( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster admin credential of a managed cluster. + + Gets cluster admin credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore + + async def list_cluster_user_credentials( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster user credential of a managed cluster. + + Gets cluster user credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.ManagedCluster": + """Gets a managed cluster. + + Gets the details of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedCluster", + **kwargs: Any + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedCluster", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_tags_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Updates tags on a managed cluster. + + Updates a managed cluster with the specified tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a managed cluster. + + Deletes the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _reset_service_principal_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + async def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset Service Principal Profile of a managed cluster. + + Update the service principal Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a + Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterServicePrincipalProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_service_principal_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + async def _reset_aad_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + async def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset AAD Profile of a managed cluster. + + Update the AAD Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed + Cluster. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_operations.py new file mode 100755 index 00000000000..88f0e670aba --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2019_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationListResult"]: + """Gets a list of compute operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/container_service_client.py deleted file mode 100644 index 7f6a9856261..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/container_service_client.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.managed_clusters_operations import ManagedClustersOperations -from .operations.agent_pools_operations import AgentPoolsOperations -from .operations.container_services_operations import ContainerServicesOperations -from . import models - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2019_04_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2019_04_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2019_04_01.operations.AgentPoolsOperations - :ivar container_services: ContainerServices operations - :vartype container_services: azure.mgmt.containerservice.v2019_04_01.operations.ContainerServicesOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-04-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.container_services = ContainerServicesOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/__init__.py old mode 100644 new mode 100755 index 741ab9ea8b7..1a2e8eac670 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/__init__.py @@ -1,127 +1,124 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- try: - from .operation_value_py3 import OperationValue - from .resource_py3 import Resource - from .sub_resource_py3 import SubResource - from .tags_object_py3 import TagsObject - from .managed_cluster_service_principal_profile_py3 import ManagedClusterServicePrincipalProfile - from .container_service_master_profile_py3 import ContainerServiceMasterProfile - from .managed_cluster_agent_pool_profile_properties_py3 import ManagedClusterAgentPoolProfileProperties - from .managed_cluster_agent_pool_profile_py3 import ManagedClusterAgentPoolProfile - from .agent_pool_py3 import AgentPool - from .managed_cluster_windows_profile_py3 import ManagedClusterWindowsProfile - from .container_service_ssh_public_key_py3 import ContainerServiceSshPublicKey - from .container_service_ssh_configuration_py3 import ContainerServiceSshConfiguration - from .container_service_linux_profile_py3 import ContainerServiceLinuxProfile - from .container_service_network_profile_py3 import ContainerServiceNetworkProfile - from .container_service_vm_diagnostics_py3 import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile_py3 import ContainerServiceDiagnosticsProfile - from .managed_cluster_addon_profile_py3 import ManagedClusterAddonProfile - from .managed_cluster_aad_profile_py3 import ManagedClusterAADProfile - from .managed_cluster_identity_py3 import ManagedClusterIdentity - from .managed_cluster_py3 import ManagedCluster - from .managed_cluster_access_profile_py3 import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile_upgrades_item_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from .managed_cluster_pool_upgrade_profile_py3 import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile_py3 import ManagedClusterUpgradeProfile - from .credential_result_py3 import CredentialResult - from .credential_results_py3 import CredentialResults - from .orchestrator_profile_py3 import OrchestratorProfile - from .orchestrator_version_profile_py3 import OrchestratorVersionProfile - from .orchestrator_version_profile_list_result_py3 import OrchestratorVersionProfileListResult + from ._models_py3 import AgentPool + from ._models_py3 import AgentPoolListResult + from ._models_py3 import CloudErrorBody + from ._models_py3 import ContainerServiceDiagnosticsProfile + from ._models_py3 import ContainerServiceLinuxProfile + from ._models_py3 import ContainerServiceMasterProfile + from ._models_py3 import ContainerServiceNetworkProfile + from ._models_py3 import ContainerServiceSshConfiguration + from ._models_py3 import ContainerServiceSshPublicKey + from ._models_py3 import ContainerServiceVMDiagnostics + from ._models_py3 import CredentialResult + from ._models_py3 import CredentialResults + from ._models_py3 import ManagedCluster + from ._models_py3 import ManagedClusterAADProfile + from ._models_py3 import ManagedClusterAccessProfile + from ._models_py3 import ManagedClusterAddonProfile + from ._models_py3 import ManagedClusterAgentPoolProfile + from ._models_py3 import ManagedClusterAgentPoolProfileProperties + from ._models_py3 import ManagedClusterIdentity + from ._models_py3 import ManagedClusterListResult + from ._models_py3 import ManagedClusterPoolUpgradeProfile + from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem + from ._models_py3 import ManagedClusterServicePrincipalProfile + from ._models_py3 import ManagedClusterUpgradeProfile + from ._models_py3 import ManagedClusterWindowsProfile + from ._models_py3 import OperationListResult + from ._models_py3 import OperationValue + from ._models_py3 import Resource + from ._models_py3 import SubResource + from ._models_py3 import TagsObject except (SyntaxError, ImportError): - from .operation_value import OperationValue - from .resource import Resource - from .sub_resource import SubResource - from .tags_object import TagsObject - from .managed_cluster_service_principal_profile import ManagedClusterServicePrincipalProfile - from .container_service_master_profile import ContainerServiceMasterProfile - from .managed_cluster_agent_pool_profile_properties import ManagedClusterAgentPoolProfileProperties - from .managed_cluster_agent_pool_profile import ManagedClusterAgentPoolProfile - from .agent_pool import AgentPool - from .managed_cluster_windows_profile import ManagedClusterWindowsProfile - from .container_service_ssh_public_key import ContainerServiceSshPublicKey - from .container_service_ssh_configuration import ContainerServiceSshConfiguration - from .container_service_linux_profile import ContainerServiceLinuxProfile - from .container_service_network_profile import ContainerServiceNetworkProfile - from .container_service_vm_diagnostics import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile import ContainerServiceDiagnosticsProfile - from .managed_cluster_addon_profile import ManagedClusterAddonProfile - from .managed_cluster_aad_profile import ManagedClusterAADProfile - from .managed_cluster_identity import ManagedClusterIdentity - from .managed_cluster import ManagedCluster - from .managed_cluster_access_profile import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile_upgrades_item import ManagedClusterPoolUpgradeProfileUpgradesItem - from .managed_cluster_pool_upgrade_profile import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile import ManagedClusterUpgradeProfile - from .credential_result import CredentialResult - from .credential_results import CredentialResults - from .orchestrator_profile import OrchestratorProfile - from .orchestrator_version_profile import OrchestratorVersionProfile - from .orchestrator_version_profile_list_result import OrchestratorVersionProfileListResult -from .operation_value_paged import OperationValuePaged -from .managed_cluster_paged import ManagedClusterPaged -from .agent_pool_paged import AgentPoolPaged -from .container_service_client_enums import ( + from ._models import AgentPool # type: ignore + from ._models import AgentPoolListResult # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import ContainerServiceDiagnosticsProfile # type: ignore + from ._models import ContainerServiceLinuxProfile # type: ignore + from ._models import ContainerServiceMasterProfile # type: ignore + from ._models import ContainerServiceNetworkProfile # type: ignore + from ._models import ContainerServiceSshConfiguration # type: ignore + from ._models import ContainerServiceSshPublicKey # type: ignore + from ._models import ContainerServiceVMDiagnostics # type: ignore + from ._models import CredentialResult # type: ignore + from ._models import CredentialResults # type: ignore + from ._models import ManagedCluster # type: ignore + from ._models import ManagedClusterAADProfile # type: ignore + from ._models import ManagedClusterAccessProfile # type: ignore + from ._models import ManagedClusterAddonProfile # type: ignore + from ._models import ManagedClusterAgentPoolProfile # type: ignore + from ._models import ManagedClusterAgentPoolProfileProperties # type: ignore + from ._models import ManagedClusterIdentity # type: ignore + from ._models import ManagedClusterListResult # type: ignore + from ._models import ManagedClusterPoolUpgradeProfile # type: ignore + from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem # type: ignore + from ._models import ManagedClusterServicePrincipalProfile # type: ignore + from ._models import ManagedClusterUpgradeProfile # type: ignore + from ._models import ManagedClusterWindowsProfile # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import OperationValue # type: ignore + from ._models import Resource # type: ignore + from ._models import SubResource # type: ignore + from ._models import TagsObject # type: ignore + +from ._container_service_client_enums import ( + AgentPoolType, ContainerServiceStorageProfileTypes, ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, + Count, + LoadBalancerSku, NetworkPlugin, NetworkPolicy, - LoadBalancerSku, + OSType, ResourceIdentityType, ) __all__ = [ - 'OperationValue', - 'Resource', - 'SubResource', - 'TagsObject', - 'ManagedClusterServicePrincipalProfile', - 'ContainerServiceMasterProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAgentPoolProfile', 'AgentPool', - 'ManagedClusterWindowsProfile', - 'ContainerServiceSshPublicKey', - 'ContainerServiceSshConfiguration', + 'AgentPoolListResult', + 'CloudErrorBody', + 'ContainerServiceDiagnosticsProfile', 'ContainerServiceLinuxProfile', + 'ContainerServiceMasterProfile', 'ContainerServiceNetworkProfile', + 'ContainerServiceSshConfiguration', + 'ContainerServiceSshPublicKey', 'ContainerServiceVMDiagnostics', - 'ContainerServiceDiagnosticsProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAADProfile', - 'ManagedClusterIdentity', + 'CredentialResult', + 'CredentialResults', 'ManagedCluster', + 'ManagedClusterAADProfile', 'ManagedClusterAccessProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', + 'ManagedClusterAddonProfile', + 'ManagedClusterAgentPoolProfile', + 'ManagedClusterAgentPoolProfileProperties', + 'ManagedClusterIdentity', + 'ManagedClusterListResult', 'ManagedClusterPoolUpgradeProfile', + 'ManagedClusterPoolUpgradeProfileUpgradesItem', + 'ManagedClusterServicePrincipalProfile', 'ManagedClusterUpgradeProfile', - 'CredentialResult', - 'CredentialResults', - 'OrchestratorProfile', - 'OrchestratorVersionProfile', - 'OrchestratorVersionProfileListResult', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', + 'ManagedClusterWindowsProfile', + 'OperationListResult', + 'OperationValue', + 'Resource', + 'SubResource', + 'TagsObject', + 'AgentPoolType', 'ContainerServiceStorageProfileTypes', 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', + 'Count', + 'LoadBalancerSku', 'NetworkPlugin', 'NetworkPolicy', - 'LoadBalancerSku', + 'OSType', 'ResourceIdentityType', ] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_container_service_client_enums.py new file mode 100755 index 00000000000..02e7ae312cd --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_container_service_client_enums.py @@ -0,0 +1,269 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AgentPoolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """AgentPoolType represents types of an agent pool. VirtualMachineScaleSets type is still in + PREVIEW. + """ + + VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" + AVAILABILITY_SET = "AvailabilitySet" + +class ContainerServiceStorageProfileTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Storage profile specifies what kind of storage used. Choose from StorageAccount and + ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. + """ + + STORAGE_ACCOUNT = "StorageAccount" + MANAGED_DISKS = "ManagedDisks" + +class ContainerServiceVMSizeTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Size of agent VMs. + """ + + STANDARD_A1 = "Standard_A1" + STANDARD_A10 = "Standard_A10" + STANDARD_A11 = "Standard_A11" + STANDARD_A1_V2 = "Standard_A1_v2" + STANDARD_A2 = "Standard_A2" + STANDARD_A2_V2 = "Standard_A2_v2" + STANDARD_A2_M_V2 = "Standard_A2m_v2" + STANDARD_A3 = "Standard_A3" + STANDARD_A4 = "Standard_A4" + STANDARD_A4_V2 = "Standard_A4_v2" + STANDARD_A4_M_V2 = "Standard_A4m_v2" + STANDARD_A5 = "Standard_A5" + STANDARD_A6 = "Standard_A6" + STANDARD_A7 = "Standard_A7" + STANDARD_A8 = "Standard_A8" + STANDARD_A8_V2 = "Standard_A8_v2" + STANDARD_A8_M_V2 = "Standard_A8m_v2" + STANDARD_A9 = "Standard_A9" + STANDARD_B2_MS = "Standard_B2ms" + STANDARD_B2_S = "Standard_B2s" + STANDARD_B4_MS = "Standard_B4ms" + STANDARD_B8_MS = "Standard_B8ms" + STANDARD_D1 = "Standard_D1" + STANDARD_D11 = "Standard_D11" + STANDARD_D11_V2 = "Standard_D11_v2" + STANDARD_D11_V2_PROMO = "Standard_D11_v2_Promo" + STANDARD_D12 = "Standard_D12" + STANDARD_D12_V2 = "Standard_D12_v2" + STANDARD_D12_V2_PROMO = "Standard_D12_v2_Promo" + STANDARD_D13 = "Standard_D13" + STANDARD_D13_V2 = "Standard_D13_v2" + STANDARD_D13_V2_PROMO = "Standard_D13_v2_Promo" + STANDARD_D14 = "Standard_D14" + STANDARD_D14_V2 = "Standard_D14_v2" + STANDARD_D14_V2_PROMO = "Standard_D14_v2_Promo" + STANDARD_D15_V2 = "Standard_D15_v2" + STANDARD_D16_V3 = "Standard_D16_v3" + STANDARD_D16_S_V3 = "Standard_D16s_v3" + STANDARD_D1_V2 = "Standard_D1_v2" + STANDARD_D2 = "Standard_D2" + STANDARD_D2_V2 = "Standard_D2_v2" + STANDARD_D2_V2_PROMO = "Standard_D2_v2_Promo" + STANDARD_D2_V3 = "Standard_D2_v3" + STANDARD_D2_S_V3 = "Standard_D2s_v3" + STANDARD_D3 = "Standard_D3" + STANDARD_D32_V3 = "Standard_D32_v3" + STANDARD_D32_S_V3 = "Standard_D32s_v3" + STANDARD_D3_V2 = "Standard_D3_v2" + STANDARD_D3_V2_PROMO = "Standard_D3_v2_Promo" + STANDARD_D4 = "Standard_D4" + STANDARD_D4_V2 = "Standard_D4_v2" + STANDARD_D4_V2_PROMO = "Standard_D4_v2_Promo" + STANDARD_D4_V3 = "Standard_D4_v3" + STANDARD_D4_S_V3 = "Standard_D4s_v3" + STANDARD_D5_V2 = "Standard_D5_v2" + STANDARD_D5_V2_PROMO = "Standard_D5_v2_Promo" + STANDARD_D64_V3 = "Standard_D64_v3" + STANDARD_D64_S_V3 = "Standard_D64s_v3" + STANDARD_D8_V3 = "Standard_D8_v3" + STANDARD_D8_S_V3 = "Standard_D8s_v3" + STANDARD_DS1 = "Standard_DS1" + STANDARD_DS11 = "Standard_DS11" + STANDARD_DS11_V2 = "Standard_DS11_v2" + STANDARD_DS11_V2_PROMO = "Standard_DS11_v2_Promo" + STANDARD_DS12 = "Standard_DS12" + STANDARD_DS12_V2 = "Standard_DS12_v2" + STANDARD_DS12_V2_PROMO = "Standard_DS12_v2_Promo" + STANDARD_DS13 = "Standard_DS13" + STANDARD_DS13_2_V2 = "Standard_DS13-2_v2" + STANDARD_DS13_4_V2 = "Standard_DS13-4_v2" + STANDARD_DS13_V2 = "Standard_DS13_v2" + STANDARD_DS13_V2_PROMO = "Standard_DS13_v2_Promo" + STANDARD_DS14 = "Standard_DS14" + STANDARD_DS14_4_V2 = "Standard_DS14-4_v2" + STANDARD_DS14_8_V2 = "Standard_DS14-8_v2" + STANDARD_DS14_V2 = "Standard_DS14_v2" + STANDARD_DS14_V2_PROMO = "Standard_DS14_v2_Promo" + STANDARD_DS15_V2 = "Standard_DS15_v2" + STANDARD_DS1_V2 = "Standard_DS1_v2" + STANDARD_DS2 = "Standard_DS2" + STANDARD_DS2_V2 = "Standard_DS2_v2" + STANDARD_DS2_V2_PROMO = "Standard_DS2_v2_Promo" + STANDARD_DS3 = "Standard_DS3" + STANDARD_DS3_V2 = "Standard_DS3_v2" + STANDARD_DS3_V2_PROMO = "Standard_DS3_v2_Promo" + STANDARD_DS4 = "Standard_DS4" + STANDARD_DS4_V2 = "Standard_DS4_v2" + STANDARD_DS4_V2_PROMO = "Standard_DS4_v2_Promo" + STANDARD_DS5_V2 = "Standard_DS5_v2" + STANDARD_DS5_V2_PROMO = "Standard_DS5_v2_Promo" + STANDARD_E16_V3 = "Standard_E16_v3" + STANDARD_E16_S_V3 = "Standard_E16s_v3" + STANDARD_E2_V3 = "Standard_E2_v3" + STANDARD_E2_S_V3 = "Standard_E2s_v3" + STANDARD_E32_16_S_V3 = "Standard_E32-16s_v3" + STANDARD_E32_8_S_V3 = "Standard_E32-8s_v3" + STANDARD_E32_V3 = "Standard_E32_v3" + STANDARD_E32_S_V3 = "Standard_E32s_v3" + STANDARD_E4_V3 = "Standard_E4_v3" + STANDARD_E4_S_V3 = "Standard_E4s_v3" + STANDARD_E64_16_S_V3 = "Standard_E64-16s_v3" + STANDARD_E64_32_S_V3 = "Standard_E64-32s_v3" + STANDARD_E64_V3 = "Standard_E64_v3" + STANDARD_E64_S_V3 = "Standard_E64s_v3" + STANDARD_E8_V3 = "Standard_E8_v3" + STANDARD_E8_S_V3 = "Standard_E8s_v3" + STANDARD_F1 = "Standard_F1" + STANDARD_F16 = "Standard_F16" + STANDARD_F16_S = "Standard_F16s" + STANDARD_F16_S_V2 = "Standard_F16s_v2" + STANDARD_F1_S = "Standard_F1s" + STANDARD_F2 = "Standard_F2" + STANDARD_F2_S = "Standard_F2s" + STANDARD_F2_S_V2 = "Standard_F2s_v2" + STANDARD_F32_S_V2 = "Standard_F32s_v2" + STANDARD_F4 = "Standard_F4" + STANDARD_F4_S = "Standard_F4s" + STANDARD_F4_S_V2 = "Standard_F4s_v2" + STANDARD_F64_S_V2 = "Standard_F64s_v2" + STANDARD_F72_S_V2 = "Standard_F72s_v2" + STANDARD_F8 = "Standard_F8" + STANDARD_F8_S = "Standard_F8s" + STANDARD_F8_S_V2 = "Standard_F8s_v2" + STANDARD_G1 = "Standard_G1" + STANDARD_G2 = "Standard_G2" + STANDARD_G3 = "Standard_G3" + STANDARD_G4 = "Standard_G4" + STANDARD_G5 = "Standard_G5" + STANDARD_GS1 = "Standard_GS1" + STANDARD_GS2 = "Standard_GS2" + STANDARD_GS3 = "Standard_GS3" + STANDARD_GS4 = "Standard_GS4" + STANDARD_GS4_4 = "Standard_GS4-4" + STANDARD_GS4_8 = "Standard_GS4-8" + STANDARD_GS5 = "Standard_GS5" + STANDARD_GS5_16 = "Standard_GS5-16" + STANDARD_GS5_8 = "Standard_GS5-8" + STANDARD_H16 = "Standard_H16" + STANDARD_H16_M = "Standard_H16m" + STANDARD_H16_MR = "Standard_H16mr" + STANDARD_H16_R = "Standard_H16r" + STANDARD_H8 = "Standard_H8" + STANDARD_H8_M = "Standard_H8m" + STANDARD_L16_S = "Standard_L16s" + STANDARD_L32_S = "Standard_L32s" + STANDARD_L4_S = "Standard_L4s" + STANDARD_L8_S = "Standard_L8s" + STANDARD_M128_32_MS = "Standard_M128-32ms" + STANDARD_M128_64_MS = "Standard_M128-64ms" + STANDARD_M128_MS = "Standard_M128ms" + STANDARD_M128_S = "Standard_M128s" + STANDARD_M64_16_MS = "Standard_M64-16ms" + STANDARD_M64_32_MS = "Standard_M64-32ms" + STANDARD_M64_MS = "Standard_M64ms" + STANDARD_M64_S = "Standard_M64s" + STANDARD_NC12 = "Standard_NC12" + STANDARD_NC12_S_V2 = "Standard_NC12s_v2" + STANDARD_NC12_S_V3 = "Standard_NC12s_v3" + STANDARD_NC24 = "Standard_NC24" + STANDARD_NC24_R = "Standard_NC24r" + STANDARD_NC24_RS_V2 = "Standard_NC24rs_v2" + STANDARD_NC24_RS_V3 = "Standard_NC24rs_v3" + STANDARD_NC24_S_V2 = "Standard_NC24s_v2" + STANDARD_NC24_S_V3 = "Standard_NC24s_v3" + STANDARD_NC6 = "Standard_NC6" + STANDARD_NC6_S_V2 = "Standard_NC6s_v2" + STANDARD_NC6_S_V3 = "Standard_NC6s_v3" + STANDARD_ND12_S = "Standard_ND12s" + STANDARD_ND24_RS = "Standard_ND24rs" + STANDARD_ND24_S = "Standard_ND24s" + STANDARD_ND6_S = "Standard_ND6s" + STANDARD_NV12 = "Standard_NV12" + STANDARD_NV24 = "Standard_NV24" + STANDARD_NV6 = "Standard_NV6" + +class Count(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): + """Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The + default value is 1. + """ + + ONE = 1 + THREE = 3 + FIVE = 5 + +class LoadBalancerSku(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The load balancer sku for the managed cluster. + """ + + STANDARD = "standard" + BASIC = "basic" + +class NetworkPlugin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network plugin used for building Kubernetes network. + """ + + AZURE = "azure" + KUBENET = "kubenet" + +class NetworkPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network policy used for building Kubernetes network. + """ + + CALICO = "calico" + AZURE = "azure" + +class OSType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + """ + + LINUX = "Linux" + WINDOWS = "Windows" + +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly + created identity in master components and an auto-created user assigned identity in MC_ + resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, service + principal will be used instead. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + NONE = "None" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_models.py new file mode 100755 index 00000000000..df83703d36e --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_models.py @@ -0,0 +1,1466 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import msrest.serialization + + +class SubResource(msrest.serialization.Model): + """Reference to another subresource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AgentPool(SubResource): + """Agent Pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type_properties_type: AgentPoolType represents types of an agent pool. Possible values + include: "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or + ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param availability_zones: (PREVIEW) Availability zones for nodes. Must use + VirtualMachineScaleSets AgentPoolType. + :type availability_zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'count': {'maximum': 100, 'minimum': 1}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, + 'min_count': {'key': 'properties.minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPool, self).__init__(**kwargs) + self.count = kwargs.get('count', 1) + self.vm_size = kwargs.get('vm_size', None) + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.max_pods = kwargs.get('max_pods', None) + self.os_type = kwargs.get('os_type', "Linux") + self.max_count = kwargs.get('max_count', None) + self.min_count = kwargs.get('min_count', None) + self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) + self.type_properties_type = kwargs.get('type_properties_type', None) + self.orchestrator_version = kwargs.get('orchestrator_version', None) + self.provisioning_state = None + self.availability_zones = kwargs.get('availability_zones', None) + + +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the Container service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.containerservice.v2019_04_01.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. + :type vm_diagnostics: + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMDiagnostics + """ + + _validation = { + 'vm_diagnostics': {'required': True}, + } + + _attribute_map = { + 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) + self.vm_diagnostics = kwargs['vm_diagnostics'] + + +class ContainerServiceLinuxProfile(msrest.serialization.Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Linux VMs. + :type admin_username: str + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshConfiguration + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, + 'ssh': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceLinuxProfile, self).__init__(**kwargs) + self.admin_username = kwargs['admin_username'] + self.ssh = kwargs['ssh'] + + +class ContainerServiceMasterProfile(msrest.serialization.Model): + """Profile for the container service master. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2019_04_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. + :type dns_prefix: str + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. + :type first_consecutive_static_ip: str + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + """ + + _validation = { + 'dns_prefix': {'required': True}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceMasterProfile, self).__init__(**kwargs) + self.count = kwargs.get('count', "1") + self.dns_prefix = kwargs['dns_prefix'] + self.vm_size = kwargs['vm_size'] + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") + self.storage_profile = kwargs.get('storage_profile', None) + self.fqdn = None + + +class ContainerServiceNetworkProfile(msrest.serialization.Model): + """Profile of network configuration. + + :param network_plugin: Network plugin used for building Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPolicy + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + :type pod_cidr: str + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. + :type service_cidr: str + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. + :type dns_service_ip: str + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :type docker_bridge_cidr: str + :param load_balancer_sku: The load balancer sku for the managed cluster. Possible values + include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2019_04_01.models.LoadBalancerSku + """ + + _validation = { + 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, + 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + } + + _attribute_map = { + 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, + 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, + 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceNetworkProfile, self).__init__(**kwargs) + self.network_plugin = kwargs.get('network_plugin', "kubenet") + self.network_policy = kwargs.get('network_policy', None) + self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") + self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") + self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") + self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") + self.load_balancer_sku = kwargs.get('load_balancer_sku', None) + + +class ContainerServiceSshConfiguration(msrest.serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. + :type public_keys: + list[~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshPublicKey] + """ + + _validation = { + 'public_keys': {'required': True}, + } + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceSshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs['public_keys'] + + +class ContainerServiceSshPublicKey(msrest.serialization.Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. + :type key_data: str + """ + + _validation = { + 'key_data': {'required': True}, + } + + _attribute_map = { + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceSshPublicKey, self).__init__(**kwargs) + self.key_data = kwargs['key_data'] + + +class ContainerServiceVMDiagnostics(msrest.serialization.Model): + """Profile for diagnostics on the container service VMs. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. + :type enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are stored. + :vartype storage_uri: str + """ + + _validation = { + 'enabled': {'required': True}, + 'storage_uri': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.storage_uri = None + + +class CredentialResult(msrest.serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(msrest.serialization.Model): + """The list of credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2019_04_01.models.CredentialResult] + """ + + _validation = { + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResults, self).__init__(**kwargs) + self.kubeconfigs = None + + +class Resource(msrest.serialization.Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + + +class ManagedCluster(Resource): + """Managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAddonProfile] + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile + :param api_server_authorized_ip_ranges: (PREVIEW) Authorized IP Ranges to kubernetes API + server. + :type api_server_authorized_ip_ranges: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedCluster, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.provisioning_state = None + self.max_agent_pools = None + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.dns_prefix = kwargs.get('dns_prefix', None) + self.fqdn = None + self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.linux_profile = kwargs.get('linux_profile', None) + self.windows_profile = kwargs.get('windows_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.addon_profiles = kwargs.get('addon_profiles', None) + self.node_resource_group = kwargs.get('node_resource_group', None) + self.enable_rbac = kwargs.get('enable_rbac', None) + self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) + self.network_profile = kwargs.get('network_profile', None) + self.aad_profile = kwargs.get('aad_profile', None) + self.api_server_authorized_ip_ranges = kwargs.get('api_server_authorized_ip_ranges', None) + + +class ManagedClusterAADProfile(msrest.serialization.Model): + """AADProfile specifies attributes for Azure Active Directory integration. + + All required parameters must be populated in order to send to Azure. + + :param client_app_id: Required. The client AAD application ID. + :type client_app_id: str + :param server_app_id: Required. The server AAD application ID. + :type server_app_id: str + :param server_app_secret: The server AAD application secret. + :type server_app_secret: str + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. + :type tenant_id: str + """ + + _validation = { + 'client_app_id': {'required': True}, + 'server_app_id': {'required': True}, + } + + _attribute_map = { + 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, + 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, + 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, + 'tenant_id': {'key': 'tenantID', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAADProfile, self).__init__(**kwargs) + self.client_app_id = kwargs['client_app_id'] + self.server_app_id = kwargs['server_app_id'] + self.server_app_secret = kwargs.get('server_app_secret', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class ManagedClusterAccessProfile(Resource): + """Managed cluster Access Profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param kube_config: Base64-encoded Kubernetes configuration file. + :type kube_config: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAccessProfile, self).__init__(**kwargs) + self.kube_config = kwargs.get('kube_config', None) + + +class ManagedClusterAddonProfile(msrest.serialization.Model): + """A Kubernetes add-on profile for a managed cluster. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the add-on is enabled or not. + :type enabled: bool + :param config: Key-value pairs for configuring an add-on. + :type config: dict[str, str] + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'config': {'key': 'config', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAddonProfile, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.config = kwargs.get('config', None) + + +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): + """Properties for the container service agent pool profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. Number of agents (VMs) to host docker containers. Allowed values must + be in the range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param availability_zones: (PREVIEW) Availability zones for nodes. Must use + VirtualMachineScaleSets AgentPoolType. + :type availability_zones: list[str] + """ + + _validation = { + 'count': {'required': True, 'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) + self.count = kwargs.get('count', 1) + self.vm_size = kwargs['vm_size'] + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.max_pods = kwargs.get('max_pods', None) + self.os_type = kwargs.get('os_type', "Linux") + self.max_count = kwargs.get('max_count', None) + self.min_count = kwargs.get('min_count', None) + self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) + self.type = kwargs.get('type', None) + self.orchestrator_version = kwargs.get('orchestrator_version', None) + self.provisioning_state = None + self.availability_zones = kwargs.get('availability_zones', None) + + +class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): + """Profile for the container service agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. Number of agents (VMs) to host docker containers. Allowed values must + be in the range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param availability_zones: (PREVIEW) Availability zones for nodes. Must use + VirtualMachineScaleSets AgentPoolType. + :type availability_zones: list[str] + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. + :type name: str + """ + + _validation = { + 'count': {'required': True, 'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) + self.name = kwargs['name'] + + +class ManagedClusterIdentity(msrest.serialization.Model): + """Identity for the managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. + :vartype tenant_id: str + :param type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use + an implicitly created identity in master components and an auto-created user assigned identity + in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, + service principal will be used instead. Possible values include: "SystemAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2019_04_01.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): + """The list of available upgrade versions. + + All required parameters must be populated in order to send to Azure. + + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param name: Pool name. + :type name: str + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. + :type upgrades: + list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + """ + + _validation = { + 'kubernetes_version': {'required': True}, + 'os_type': {'required': True}, + } + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) + self.kubernetes_version = kwargs['kubernetes_version'] + self.name = kwargs.get('name', None) + self.os_type = kwargs.get('os_type', "Linux") + self.upgrades = kwargs.get('upgrades', None) + + +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): + """ManagedClusterPoolUpgradeProfileUpgradesItem. + + :param kubernetes_version: Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.is_preview = kwargs.get('is_preview', None) + + +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal in plain text. + :type secret: str + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = kwargs['client_id'] + self.secret = kwargs.get('secret', None) + + +class ManagedClusterUpgradeProfile(msrest.serialization.Model): + """The list of available upgrades for compute pools. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Id of upgrade profile. + :vartype id: str + :ivar name: Name of upgrade profile. + :vartype name: str + :ivar type: Type of upgrade profile. + :vartype type: str + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. + :type control_plane_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'control_plane_profile': {'required': True}, + 'agent_pool_profiles': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.control_plane_profile = kwargs['control_plane_profile'] + self.agent_pool_profiles = kwargs['agent_pool_profiles'] + + +class ManagedClusterWindowsProfile(msrest.serialization.Model): + """Profile for Windows VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. + :type admin_username: str + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + :type admin_password: str + """ + + _validation = { + 'admin_username': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterWindowsProfile, self).__init__(**kwargs) + self.admin_username = kwargs['admin_username'] + self.admin_password = kwargs.get('admin_password', None) + + +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.containerservice.v2019_04_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(TagsObject, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_models_py3.py new file mode 100755 index 00000000000..169658545b0 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_models_py3.py @@ -0,0 +1,1599 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Dict, List, Optional, Union + +import msrest.serialization + +from ._container_service_client_enums import * + + +class SubResource(msrest.serialization.Model): + """Reference to another subresource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AgentPool(SubResource): + """Agent Pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type_properties_type: AgentPoolType represents types of an agent pool. Possible values + include: "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or + ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param availability_zones: (PREVIEW) Availability zones for nodes. Must use + VirtualMachineScaleSets AgentPoolType. + :type availability_zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'count': {'maximum': 100, 'minimum': 1}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, + 'min_count': {'key': 'properties.minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, + } + + def __init__( + self, + *, + count: Optional[int] = 1, + vm_size: Optional[Union[str, "ContainerServiceVMSizeTypes"]] = None, + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type_properties_type: Optional[Union[str, "AgentPoolType"]] = None, + orchestrator_version: Optional[str] = None, + availability_zones: Optional[List[str]] = None, + **kwargs + ): + super(AgentPool, self).__init__(**kwargs) + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.vnet_subnet_id = vnet_subnet_id + self.max_pods = max_pods + self.os_type = os_type + self.max_count = max_count + self.min_count = min_count + self.enable_auto_scaling = enable_auto_scaling + self.type_properties_type = type_properties_type + self.orchestrator_version = orchestrator_version + self.provisioning_state = None + self.availability_zones = availability_zones + + +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AgentPool"]] = None, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the Container service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.containerservice.v2019_04_01.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["CloudErrorBody"]] = None, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. + :type vm_diagnostics: + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMDiagnostics + """ + + _validation = { + 'vm_diagnostics': {'required': True}, + } + + _attribute_map = { + 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, + } + + def __init__( + self, + *, + vm_diagnostics: "ContainerServiceVMDiagnostics", + **kwargs + ): + super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) + self.vm_diagnostics = vm_diagnostics + + +class ContainerServiceLinuxProfile(msrest.serialization.Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Linux VMs. + :type admin_username: str + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshConfiguration + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, + 'ssh': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, + } + + def __init__( + self, + *, + admin_username: str, + ssh: "ContainerServiceSshConfiguration", + **kwargs + ): + super(ContainerServiceLinuxProfile, self).__init__(**kwargs) + self.admin_username = admin_username + self.ssh = ssh + + +class ContainerServiceMasterProfile(msrest.serialization.Model): + """Profile for the container service master. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2019_04_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. + :type dns_prefix: str + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. + :type first_consecutive_static_ip: str + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + """ + + _validation = { + 'dns_prefix': {'required': True}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__( + self, + *, + dns_prefix: str, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + count: Optional[Union[int, "Count"]] = "1", + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + first_consecutive_static_ip: Optional[str] = "10.240.255.5", + storage_profile: Optional[Union[str, "ContainerServiceStorageProfileTypes"]] = None, + **kwargs + ): + super(ContainerServiceMasterProfile, self).__init__(**kwargs) + self.count = count + self.dns_prefix = dns_prefix + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.vnet_subnet_id = vnet_subnet_id + self.first_consecutive_static_ip = first_consecutive_static_ip + self.storage_profile = storage_profile + self.fqdn = None + + +class ContainerServiceNetworkProfile(msrest.serialization.Model): + """Profile of network configuration. + + :param network_plugin: Network plugin used for building Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPolicy + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + :type pod_cidr: str + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. + :type service_cidr: str + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. + :type dns_service_ip: str + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :type docker_bridge_cidr: str + :param load_balancer_sku: The load balancer sku for the managed cluster. Possible values + include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2019_04_01.models.LoadBalancerSku + """ + + _validation = { + 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, + 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + } + + _attribute_map = { + 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, + 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, + 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, + } + + def __init__( + self, + *, + network_plugin: Optional[Union[str, "NetworkPlugin"]] = "kubenet", + network_policy: Optional[Union[str, "NetworkPolicy"]] = None, + pod_cidr: Optional[str] = "10.244.0.0/16", + service_cidr: Optional[str] = "10.0.0.0/16", + dns_service_ip: Optional[str] = "10.0.0.10", + docker_bridge_cidr: Optional[str] = "172.17.0.1/16", + load_balancer_sku: Optional[Union[str, "LoadBalancerSku"]] = None, + **kwargs + ): + super(ContainerServiceNetworkProfile, self).__init__(**kwargs) + self.network_plugin = network_plugin + self.network_policy = network_policy + self.pod_cidr = pod_cidr + self.service_cidr = service_cidr + self.dns_service_ip = dns_service_ip + self.docker_bridge_cidr = docker_bridge_cidr + self.load_balancer_sku = load_balancer_sku + + +class ContainerServiceSshConfiguration(msrest.serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. + :type public_keys: + list[~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshPublicKey] + """ + + _validation = { + 'public_keys': {'required': True}, + } + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, + } + + def __init__( + self, + *, + public_keys: List["ContainerServiceSshPublicKey"], + **kwargs + ): + super(ContainerServiceSshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class ContainerServiceSshPublicKey(msrest.serialization.Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. + :type key_data: str + """ + + _validation = { + 'key_data': {'required': True}, + } + + _attribute_map = { + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__( + self, + *, + key_data: str, + **kwargs + ): + super(ContainerServiceSshPublicKey, self).__init__(**kwargs) + self.key_data = key_data + + +class ContainerServiceVMDiagnostics(msrest.serialization.Model): + """Profile for diagnostics on the container service VMs. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. + :type enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are stored. + :vartype storage_uri: str + """ + + _validation = { + 'enabled': {'required': True}, + 'storage_uri': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__( + self, + *, + enabled: bool, + **kwargs + ): + super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = None + + +class CredentialResult(msrest.serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(msrest.serialization.Model): + """The list of credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2019_04_01.models.CredentialResult] + """ + + _validation = { + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResults, self).__init__(**kwargs) + self.kubeconfigs = None + + +class Resource(msrest.serialization.Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ManagedCluster(Resource): + """Managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAddonProfile] + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile + :param api_server_authorized_ip_ranges: (PREVIEW) Authorized IP Ranges to kubernetes API + server. + :type api_server_authorized_ip_ranges: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedClusterIdentity"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + agent_pool_profiles: Optional[List["ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "ManagedClusterAddonProfile"]] = None, + node_resource_group: Optional[str] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + network_profile: Optional["ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["ManagedClusterAADProfile"] = None, + api_server_authorized_ip_ranges: Optional[List[str]] = None, + **kwargs + ): + super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.provisioning_state = None + self.max_agent_pools = None + self.kubernetes_version = kubernetes_version + self.dns_prefix = dns_prefix + self.fqdn = None + self.agent_pool_profiles = agent_pool_profiles + self.linux_profile = linux_profile + self.windows_profile = windows_profile + self.service_principal_profile = service_principal_profile + self.addon_profiles = addon_profiles + self.node_resource_group = node_resource_group + self.enable_rbac = enable_rbac + self.enable_pod_security_policy = enable_pod_security_policy + self.network_profile = network_profile + self.aad_profile = aad_profile + self.api_server_authorized_ip_ranges = api_server_authorized_ip_ranges + + +class ManagedClusterAADProfile(msrest.serialization.Model): + """AADProfile specifies attributes for Azure Active Directory integration. + + All required parameters must be populated in order to send to Azure. + + :param client_app_id: Required. The client AAD application ID. + :type client_app_id: str + :param server_app_id: Required. The server AAD application ID. + :type server_app_id: str + :param server_app_secret: The server AAD application secret. + :type server_app_secret: str + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. + :type tenant_id: str + """ + + _validation = { + 'client_app_id': {'required': True}, + 'server_app_id': {'required': True}, + } + + _attribute_map = { + 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, + 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, + 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, + 'tenant_id': {'key': 'tenantID', 'type': 'str'}, + } + + def __init__( + self, + *, + client_app_id: str, + server_app_id: str, + server_app_secret: Optional[str] = None, + tenant_id: Optional[str] = None, + **kwargs + ): + super(ManagedClusterAADProfile, self).__init__(**kwargs) + self.client_app_id = client_app_id + self.server_app_id = server_app_id + self.server_app_secret = server_app_secret + self.tenant_id = tenant_id + + +class ManagedClusterAccessProfile(Resource): + """Managed cluster Access Profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param kube_config: Base64-encoded Kubernetes configuration file. + :type kube_config: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytearray] = None, + **kwargs + ): + super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) + self.kube_config = kube_config + + +class ManagedClusterAddonProfile(msrest.serialization.Model): + """A Kubernetes add-on profile for a managed cluster. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the add-on is enabled or not. + :type enabled: bool + :param config: Key-value pairs for configuring an add-on. + :type config: dict[str, str] + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'config': {'key': 'config', 'type': '{str}'}, + } + + def __init__( + self, + *, + enabled: bool, + config: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ManagedClusterAddonProfile, self).__init__(**kwargs) + self.enabled = enabled + self.config = config + + +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): + """Properties for the container service agent pool profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. Number of agents (VMs) to host docker containers. Allowed values must + be in the range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param availability_zones: (PREVIEW) Availability zones for nodes. Must use + VirtualMachineScaleSets AgentPoolType. + :type availability_zones: list[str] + """ + + _validation = { + 'count': {'required': True, 'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + } + + def __init__( + self, + *, + count: int = 1, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + orchestrator_version: Optional[str] = None, + availability_zones: Optional[List[str]] = None, + **kwargs + ): + super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.vnet_subnet_id = vnet_subnet_id + self.max_pods = max_pods + self.os_type = os_type + self.max_count = max_count + self.min_count = min_count + self.enable_auto_scaling = enable_auto_scaling + self.type = type + self.orchestrator_version = orchestrator_version + self.provisioning_state = None + self.availability_zones = availability_zones + + +class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): + """Profile for the container service agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. Number of agents (VMs) to host docker containers. Allowed values must + be in the range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param availability_zones: (PREVIEW) Availability zones for nodes. Must use + VirtualMachineScaleSets AgentPoolType. + :type availability_zones: list[str] + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. + :type name: str + """ + + _validation = { + 'count': {'required': True, 'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + count: int = 1, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + name: str, + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + orchestrator_version: Optional[str] = None, + availability_zones: Optional[List[str]] = None, + **kwargs + ): + super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, orchestrator_version=orchestrator_version, availability_zones=availability_zones, **kwargs) + self.name = name + + +class ManagedClusterIdentity(msrest.serialization.Model): + """Identity for the managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. + :vartype tenant_id: str + :param type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use + an implicitly created identity in master components and an auto-created user assigned identity + in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, + service principal will be used instead. Possible values include: "SystemAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2019_04_01.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + **kwargs + ): + super(ManagedClusterIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ManagedCluster"]] = None, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): + """The list of available upgrade versions. + + All required parameters must be populated in order to send to Azure. + + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param name: Pool name. + :type name: str + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. + :type upgrades: + list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + """ + + _validation = { + 'kubernetes_version': {'required': True}, + 'os_type': {'required': True}, + } + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, + } + + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "OSType"] = "Linux", + name: Optional[str] = None, + upgrades: Optional[List["ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.name = name + self.os_type = os_type + self.upgrades = upgrades + + +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): + """ManagedClusterPoolUpgradeProfileUpgradesItem. + + :param kubernetes_version: Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.is_preview = is_preview + + +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal in plain text. + :type secret: str + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + } + + def __init__( + self, + *, + client_id: str, + secret: Optional[str] = None, + **kwargs + ): + super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = client_id + self.secret = secret + + +class ManagedClusterUpgradeProfile(msrest.serialization.Model): + """The list of available upgrades for compute pools. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Id of upgrade profile. + :vartype id: str + :ivar name: Name of upgrade profile. + :vartype name: str + :ivar type: Type of upgrade profile. + :vartype type: str + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. + :type control_plane_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'control_plane_profile': {'required': True}, + 'agent_pool_profiles': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, + } + + def __init__( + self, + *, + control_plane_profile: "ManagedClusterPoolUpgradeProfile", + agent_pool_profiles: List["ManagedClusterPoolUpgradeProfile"], + **kwargs + ): + super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.control_plane_profile = control_plane_profile + self.agent_pool_profiles = agent_pool_profiles + + +class ManagedClusterWindowsProfile(msrest.serialization.Model): + """Profile for Windows VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. + :type admin_username: str + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + :type admin_password: str + """ + + _validation = { + 'admin_username': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + } + + def __init__( + self, + *, + admin_username: str, + admin_password: Optional[str] = None, + **kwargs + ): + super(ManagedClusterWindowsProfile, self).__init__(**kwargs) + self.admin_username = admin_username + self.admin_password = admin_password + + +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.containerservice.v2019_04_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(TagsObject, self).__init__(**kwargs) + self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool.py deleted file mode 100644 index 03a85e8c21c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool_paged.py deleted file mode 100644 index 860cd686515..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool_py3.py deleted file mode 100644 index 1bac16e4e2d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool_py3.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, orchestrator_version: str=None, availability_zones=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_client_enums.py deleted file mode 100644 index 08f49fc4a07..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_client_enums.py +++ /dev/null @@ -1,232 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - none = "None" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_diagnostics_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_diagnostics_profile.py deleted file mode 100644 index 01e83dba9c9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_diagnostics_profile.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_diagnostics_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_diagnostics_profile_py3.py deleted file mode 100644 index 50b20fe72bc..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_diagnostics_profile_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_linux_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_linux_profile.py deleted file mode 100644 index 2a4eac15b01..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_linux_profile.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_linux_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_linux_profile_py3.py deleted file mode 100644 index 86130b9472b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_linux_profile_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_master_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_master_profile.py deleted file mode 100644 index 0694a0309fb..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_master_profile.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_master_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_master_profile_py3.py deleted file mode 100644 index f8645cc11df..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_master_profile_py3.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_network_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_network_profile.py deleted file mode 100644 index 39f46d59a3b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_network_profile.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2019_04_01.models.LoadBalancerSku - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_network_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_network_profile_py3.py deleted file mode 100644 index 2876203d783..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_network_profile_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2019_04_01.models.LoadBalancerSku - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", load_balancer_sku=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.load_balancer_sku = load_balancer_sku diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_configuration.py deleted file mode 100644 index be8eb5b7792..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_configuration.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_configuration_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_configuration_py3.py deleted file mode 100644 index feeb3b049fa..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_configuration_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_public_key.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_public_key.py deleted file mode 100644 index da7609ba222..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_public_key.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_public_key_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_public_key_py3.py deleted file mode 100644 index 8e8c10544ef..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_public_key_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_vm_diagnostics.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_vm_diagnostics.py deleted file mode 100644 index f1804c66b68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_vm_diagnostics.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_vm_diagnostics_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_vm_diagnostics_py3.py deleted file mode 100644 index a716fc26954..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_vm_diagnostics_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_result.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_result.py deleted file mode 100644 index 89e748b481b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_result.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(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 diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_result_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_result_py3.py deleted file mode 100644 index 6f387834bf0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_result_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_results.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_results.py deleted file mode 100644 index 9ed4c77f4bf..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_results.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_04_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_results_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_results_py3.py deleted file mode 100644 index 68e0b9ff555..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_results_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_04_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster.py deleted file mode 100644 index 04fed66d87e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile - :param api_server_authorized_ip_ranges: (PREVIEW) Authorized IP Ranges to - kubernetes API server. - :type api_server_authorized_ip_ranges: list[str] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.api_server_authorized_ip_ranges = kwargs.get('api_server_authorized_ip_ranges', None) - self.identity = kwargs.get('identity', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_aad_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_aad_profile.py deleted file mode 100644 index 6a48639de34..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_aad_profile.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_aad_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_aad_profile_py3.py deleted file mode 100644 index 76289f3ddc3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_aad_profile_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_access_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_access_profile.py deleted file mode 100644 index 6dc2a4ec23b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_access_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_access_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_access_profile_py3.py deleted file mode 100644 index 0d3fb998e97..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_access_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_addon_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_addon_profile.py deleted file mode 100644 index 796f9246a68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_addon_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_addon_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_addon_profile_py3.py deleted file mode 100644 index 71e05cd14c0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_addon_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile.py deleted file mode 100644 index 4ea015c040e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .managed_cluster_agent_pool_profile_properties import ManagedClusterAgentPoolProfileProperties - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_properties.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_properties.py deleted file mode 100644 index 616bd6ecd3d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_properties.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_properties_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_properties_py3.py deleted file mode 100644 index d1c82e61b78..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_properties_py3.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_py3.py deleted file mode 100644 index 7a9b76c7b83..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_py3.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .managed_cluster_agent_pool_profile_properties_py3 import ManagedClusterAgentPoolProfileProperties - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, orchestrator_version=orchestrator_version, availability_zones=availability_zones, **kwargs) - self.name = name diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_identity.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_identity.py deleted file mode 100644 index ab0ac7ab5b0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_identity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_identity_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_identity_py3.py deleted file mode 100644 index 60c1046ad87..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_identity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_paged.py deleted file mode 100644 index 854cd481b63..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile.py deleted file mode 100644 index c646d144b41..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_py3.py deleted file mode 100644 index b6644b2036a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_upgrades_item.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_upgrades_item.py deleted file mode 100644 index 1d56a858065..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_upgrades_item.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_upgrades_item_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_upgrades_item_py3.py deleted file mode 100644 index b3f79806494..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_upgrades_item_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_py3.py deleted file mode 100644 index 10071d84902..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_py3.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile - :param api_server_authorized_ip_ranges: (PREVIEW) Authorized IP Ranges to - kubernetes API server. - :type api_server_authorized_ip_ranges: list[str] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, api_server_authorized_ip_ranges=None, identity=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.api_server_authorized_ip_ranges = api_server_authorized_ip_ranges - self.identity = identity diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_service_principal_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_service_principal_profile.py deleted file mode 100644 index 4610cedac54..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_service_principal_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_service_principal_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_service_principal_profile_py3.py deleted file mode 100644 index 6ea9e92dc40..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_service_principal_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_upgrade_profile.py deleted file mode 100644 index b4966031a07..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_upgrade_profile.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_upgrade_profile_py3.py deleted file mode 100644 index 3cd2d047c4c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_upgrade_profile_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_windows_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_windows_profile.py deleted file mode 100644 index 2f955d4ef52..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_windows_profile.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_windows_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_windows_profile_py3.py deleted file mode 100644 index 4dd22c95859..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_windows_profile_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value.py deleted file mode 100644 index 911f9fc8088..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value_paged.py deleted file mode 100644 index 3242947b178..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value_py3.py deleted file mode 100644 index 55bceaa7543..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_profile.py deleted file mode 100644 index ed7eda48c46..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_profile.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _validation = { - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = kwargs.get('orchestrator_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.is_preview = kwargs.get('is_preview', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_profile_py3.py deleted file mode 100644 index 3dd9fb586ae..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_profile_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _validation = { - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, orchestrator_version: str, orchestrator_type: str=None, is_preview: bool=None, **kwargs) -> None: - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version - self.is_preview = is_preview diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile.py deleted file mode 100644 index eec16d09f99..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfile(Model): - """The profile of an orchestrator and its available versions. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - :param default: Installed by default if version is not specified. - :type default: bool - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - :param upgrades: The list of available upgrade versions. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_04_01.models.OrchestratorProfile] - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'default': {'key': 'default', 'type': 'bool'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - 'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'}, - } - - def __init__(self, **kwargs): - super(OrchestratorVersionProfile, self).__init__(**kwargs) - self.orchestrator_type = kwargs.get('orchestrator_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.default = kwargs.get('default', None) - self.is_preview = kwargs.get('is_preview', None) - self.upgrades = kwargs.get('upgrades', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_list_result.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_list_result.py deleted file mode 100644 index 22055e165f7..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_list_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfileListResult(Model): - """The list of versions for supported orchestrators. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the orchestrator version profile list result. - :vartype id: str - :ivar name: Name of the orchestrator version profile list result. - :vartype name: str - :ivar type: Type of the orchestrator version profile list result. - :vartype type: str - :param orchestrators: Required. List of orchestrator version profiles. - :type orchestrators: - list[~azure.mgmt.containerservice.v2019_04_01.models.OrchestratorVersionProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'orchestrators': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'}, - } - - def __init__(self, **kwargs): - super(OrchestratorVersionProfileListResult, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.orchestrators = kwargs.get('orchestrators', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_list_result_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_list_result_py3.py deleted file mode 100644 index 1245185edec..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_list_result_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfileListResult(Model): - """The list of versions for supported orchestrators. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the orchestrator version profile list result. - :vartype id: str - :ivar name: Name of the orchestrator version profile list result. - :vartype name: str - :ivar type: Type of the orchestrator version profile list result. - :vartype type: str - :param orchestrators: Required. List of orchestrator version profiles. - :type orchestrators: - list[~azure.mgmt.containerservice.v2019_04_01.models.OrchestratorVersionProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'orchestrators': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'}, - } - - def __init__(self, *, orchestrators, **kwargs) -> None: - super(OrchestratorVersionProfileListResult, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.orchestrators = orchestrators diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_py3.py deleted file mode 100644 index 0ea9efab416..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfile(Model): - """The profile of an orchestrator and its available versions. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - :param default: Installed by default if version is not specified. - :type default: bool - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - :param upgrades: The list of available upgrade versions. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_04_01.models.OrchestratorProfile] - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'default': {'key': 'default', 'type': 'bool'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - 'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'}, - } - - def __init__(self, *, orchestrator_type: str, orchestrator_version: str, default: bool=None, is_preview: bool=None, upgrades=None, **kwargs) -> None: - super(OrchestratorVersionProfile, self).__init__(**kwargs) - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version - self.default = default - self.is_preview = is_preview - self.upgrades = upgrades diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/resource.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/resource.py deleted file mode 100644 index 5dd7d481c68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/resource_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/resource_py3.py deleted file mode 100644 index 2f3702caf60..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/sub_resource.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/sub_resource.py deleted file mode 100644 index a3f389ba0ba..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/sub_resource.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/sub_resource_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/sub_resource_py3.py deleted file mode 100644 index 9d61511ee2a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/sub_resource_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/tags_object.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/tags_object.py deleted file mode 100644 index 2966ec220f9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/tags_object.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/tags_object_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/tags_object_py3.py deleted file mode 100644 index 8be0bb4a15d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/tags_object_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/__init__.py old mode 100644 new mode 100755 index 6feafb436e6..5aac40228ee --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/__init__.py @@ -1,22 +1,17 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .managed_clusters_operations import ManagedClustersOperations -from .agent_pools_operations import AgentPoolsOperations -from .container_services_operations import ContainerServicesOperations +from ._operations import Operations +from ._managed_clusters_operations import ManagedClustersOperations +from ._agent_pools_operations import AgentPoolsOperations __all__ = [ 'Operations', 'ManagedClustersOperations', 'AgentPoolsOperations', - 'ContainerServicesOperations', ] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_agent_pools_operations.py new file mode 100755 index 00000000000..726d0444d0b --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_agent_pools_operations.py @@ -0,0 +1,449 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AgentPoolsOperations(object): + """AgentPoolsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2019_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AgentPoolListResult"] + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. The operation returns properties + of each agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore + + def get( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPool" + """Gets the agent pool. + + Gets the details of the agent pool by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.AgentPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPool" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AgentPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AgentPool"] + """Creates or updates an agent pool. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :param parameters: Parameters supplied to the Create or Update an agent pool operation. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.AgentPool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes an agent pool. + + Deletes the agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_managed_clusters_operations.py new file mode 100755 index 00000000000..31e63da00d3 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_managed_clusters_operations.py @@ -0,0 +1,1122 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ManagedClustersOperations(object): + """ManagedClustersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2019_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. The operation returns properties + of each managed cluster. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. The operation returns + properties of each managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def get_upgrade_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterUpgradeProfile" + """Gets upgrade profile for a managed cluster. + + Gets the details of the upgrade profile for a managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore + + def get_access_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + role_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterAccessProfile" + """Gets an access profile of a managed cluster. + + Gets the accessProfile for the specified role name of the managed cluster with a specified + resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get_access_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore + + def list_cluster_admin_credentials( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" + """Gets cluster admin credential of a managed cluster. + + Gets cluster admin credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore + + def list_cluster_user_credentials( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" + """Gets cluster user credential of a managed cluster. + + Gets cluster user credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore + + def get( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + """Gets a managed cluster. + + Gets the details of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedCluster"] + """Creates or updates a managed cluster. + + Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def _update_tags_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_tags_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_update_tags( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedCluster"] + """Updates tags on a managed cluster. + + Updates a managed cluster with the specified tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a managed cluster. + + Deletes the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def _reset_service_principal_profile_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + def begin_reset_service_principal_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Reset Service Principal Profile of a managed cluster. + + Update the service principal Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a + Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterServicePrincipalProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_service_principal_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + def _reset_aad_profile_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + def begin_reset_aad_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Reset AAD Profile of a managed cluster. + + Update the AAD Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed + Cluster. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_operations.py new file mode 100755 index 00000000000..5019cf30003 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2019_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationListResult"] + """Gets a list of compute operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/agent_pools_operations.py deleted file mode 100644 index 84711d2c78c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/agent_pools_operations.py +++ /dev/null @@ -1,376 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01" - - self.config = config - - def list( - self, resource_group_name, managed_cluster_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools'} - - def get( - self, resource_group_name, managed_cluster_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - managed_cluster_name=managed_cluster_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, managed_cluster_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, managed_cluster_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - managed_cluster_name=managed_cluster_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/container_services_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/container_services_operations.py deleted file mode 100644 index ccd56822682..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/container_services_operations.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ContainerServicesOperations(object): - """ContainerServicesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01" - - self.config = config - - def list_orchestrators( - self, location, resource_type=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported orchestrators in the specified subscription. - - Gets a list of supported orchestrators in the specified subscription. - The operation returns properties of each orchestrator including - version, available upgrades and whether that version or upgrades are in - preview. - - :param location: The name of a supported Azure region. - :type location: str - :param resource_type: resource type for which the list of - orchestrators needs to be returned - :type resource_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OrchestratorVersionProfileListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.OrchestratorVersionProfileListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_orchestrators.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if resource_type is not None: - query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OrchestratorVersionProfileListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_orchestrators.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/managed_clusters_operations.py deleted file mode 100644 index 75a89237883..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/managed_clusters_operations.py +++ /dev/null @@ -1,987 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/operations.py deleted file mode 100644 index 938b64e8f62..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2019_04_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/_container_service_client.py deleted file mode 100644 index 1b24da013b7..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/_container_service_client.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2019_08_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2019_08_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2019_08_01.operations.AgentPoolsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-08-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/__init__.py deleted file mode 100644 index 48e637b7940..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/__init__.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - ScaleSetPriority, - ScaleSetEvictionPolicy, - NetworkPlugin, - NetworkPolicy, - LoadBalancerSku, - ResourceIdentityType, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'NetworkPlugin', - 'NetworkPolicy', - 'LoadBalancerSku', - 'ResourceIdentityType', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_container_service_client_enums.py deleted file mode 100644 index aa6915a8def..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class ScaleSetPriority(str, Enum): - - low = "Low" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - none = "None" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_models.py deleted file mode 100644 index 4c0109fc000..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_models.py +++ /dev/null @@ -1,1781 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.node_taints = kwargs.get('node_taints', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2019_08_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2019_08_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_08_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2019_08_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(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(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_08_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAADProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAPIServerAccessProfile - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.identity = kwargs.get('identity', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.node_taints = kwargs.get('node_taints', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2019_08_01.models.ResourceReference] - """ - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2019_08_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2019_08_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_models_py3.py deleted file mode 100644 index 74045b0ca16..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_models_py3.py +++ /dev/null @@ -1,1781 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", node_taints=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.node_taints = node_taints - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2019_08_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2019_08_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_08_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2019_08_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_08_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAADProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAPIServerAccessProfile - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, api_server_access_profile=None, identity=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.api_server_access_profile = api_server_access_profile - self.identity = identity - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.node_taints = node_taints - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, orchestrator_version=orchestrator_version, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, node_taints=node_taints, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2019_08_01.models.ResourceReference] - """ - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2019_08_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2019_08_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_paged_models.py deleted file mode 100644 index 7a0bf6178a3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/__init__.py deleted file mode 100644 index d1b67f7888b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_agent_pools_operations.py deleted file mode 100644 index 4b0c67ec86c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,514 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2019_08_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_08_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_08_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_08_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/availableAgentPoolVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_managed_clusters_operations.py deleted file mode 100644 index 45981b993c0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,988 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_operations.py deleted file mode 100644 index b1c5b037dc2..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2019_08_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/version.py deleted file mode 100644 index b99c58c616c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2019-08-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/_container_service_client.py deleted file mode 100644 index 7fa72ba83f4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/_container_service_client.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2019_10_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2019_10_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2019_10_01.operations.AgentPoolsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-10-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/__init__.py deleted file mode 100644 index 48e637b7940..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/__init__.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - ScaleSetPriority, - ScaleSetEvictionPolicy, - NetworkPlugin, - NetworkPolicy, - LoadBalancerSku, - ResourceIdentityType, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'NetworkPlugin', - 'NetworkPolicy', - 'LoadBalancerSku', - 'ResourceIdentityType', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_container_service_client_enums.py deleted file mode 100644 index aa6915a8def..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class ScaleSetPriority(str, Enum): - - low = "Low" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - none = "None" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_models.py deleted file mode 100644 index 09b26f78d26..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_models.py +++ /dev/null @@ -1,1786 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.node_taints = kwargs.get('node_taints', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2019_10_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2019_10_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_10_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2019_10_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(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(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_10_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAADProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAPIServerAccessProfile - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.identity = kwargs.get('identity', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.node_taints = kwargs.get('node_taints', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2019_10_01.models.ResourceReference] - """ - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2019_10_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2019_10_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_models_py3.py deleted file mode 100644 index b5a92a16a2a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_models_py3.py +++ /dev/null @@ -1,1786 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", node_taints=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.node_taints = node_taints - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2019_10_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2019_10_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_10_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2019_10_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_10_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAADProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAPIServerAccessProfile - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, api_server_access_profile=None, identity=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.api_server_access_profile = api_server_access_profile - self.identity = identity - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.node_taints = node_taints - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, orchestrator_version=orchestrator_version, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, node_taints=node_taints, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2019_10_01.models.ResourceReference] - """ - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2019_10_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2019_10_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_paged_models.py deleted file mode 100644 index ea9bb9008ff..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/__init__.py deleted file mode 100644 index d1b67f7888b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_agent_pools_operations.py deleted file mode 100644 index c9dbdd83076..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,511 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-10-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2019_10_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_10_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_10_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_10_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_managed_clusters_operations.py deleted file mode 100644 index 140c54a4529..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1134 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-10-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_operations.py deleted file mode 100644 index b24ee7de294..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-10-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2019_10_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/version.py deleted file mode 100644 index f0880ef4951..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2019-10-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/_container_service_client.py deleted file mode 100644 index ce5db51f7e3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/_container_service_client.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2020_01_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2020_01_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2020_01_01.operations.AgentPoolsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-01-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/__init__.py deleted file mode 100644 index 671f9f9401d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - ScaleSetPriority, - ScaleSetEvictionPolicy, - NetworkPlugin, - NetworkPolicy, - OutboundType, - LoadBalancerSku, - ResourceIdentityType, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'NetworkPlugin', - 'NetworkPolicy', - 'OutboundType', - 'LoadBalancerSku', - 'ResourceIdentityType', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_container_service_client_enums.py deleted file mode 100644 index 1f16ba53a9b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,250 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class ScaleSetPriority(str, Enum): - - low = "Low" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - none = "None" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_models.py deleted file mode 100644 index 5a036d538db..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_models.py +++ /dev/null @@ -1,1924 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetEvictionPolicy - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_01_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_01_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_01_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_01_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(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(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_01_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAADProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetEvictionPolicy - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetEvictionPolicy - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_01_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_01_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_01_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_models_py3.py deleted file mode 100644 index 8e8fe49b76d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_models_py3.py +++ /dev/null @@ -1,1924 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetEvictionPolicy - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_01_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_01_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_01_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_01_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_01_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAADProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetEvictionPolicy - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetEvictionPolicy - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, orchestrator_version=orchestrator_version, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, tags=tags, node_labels=node_labels, node_taints=node_taints, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_01_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_01_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_01_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_paged_models.py deleted file mode 100644 index b665e1d7374..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/__init__.py deleted file mode 100644 index d1b67f7888b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_agent_pools_operations.py deleted file mode 100644 index fd546934dd5..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,511 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-01-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_01_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_01_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_01_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_01_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_managed_clusters_operations.py deleted file mode 100644 index a2214fb5ecd..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1134 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-01-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_operations.py deleted file mode 100644 index 6b5107c85ee..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-01-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_01_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/version.py deleted file mode 100644 index b25da413d3a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-01-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/_container_service_client.py deleted file mode 100644 index 7f744a9e6c5..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/_container_service_client.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2020_02_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2020_02_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2020_02_01.operations.AgentPoolsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-02-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/__init__.py deleted file mode 100644 index 671e627031d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/__init__.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - ScaleSetPriority, - ScaleSetEvictionPolicy, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - ResourceIdentityType, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'ResourceIdentityType', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_container_service_client_enums.py deleted file mode 100644 index 50453fcda77..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,257 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - low = "Low" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - none = "None" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_models.py deleted file mode 100644 index 8de59fafd3e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_models.py +++ /dev/null @@ -1,2000 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_02_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_02_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_02_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_02_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_02_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(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(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_02_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_02_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_models_py3.py deleted file mode 100644 index 6f8b2a412c3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_models_py3.py +++ /dev/null @@ -1,2000 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_02_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_02_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_02_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_02_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_02_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_02_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, orchestrator_version=orchestrator_version, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_02_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, *, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, max_graceful_termination_sec: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.max_graceful_termination_sec = max_graceful_termination_sec - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_paged_models.py deleted file mode 100644 index 5d90997da62..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_agent_pools_operations.py deleted file mode 100644 index 71b48ccc96d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,511 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-02-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_02_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_02_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_02_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_02_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_managed_clusters_operations.py deleted file mode 100644 index 47a0a3d7734..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1134 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_operations.py deleted file mode 100644 index 8d979dcf503..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_02_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/version.py deleted file mode 100644 index 5bb7dbc2923..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-02-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/_container_service_client.py deleted file mode 100644 index 112dfe36bd0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/_container_service_client.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2020_03_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2020_03_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2020_03_01.operations.AgentPoolsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-03-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/__init__.py deleted file mode 100644 index 89500883421..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/__init__.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterSKU - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - AgentPoolMode, - ScaleSetPriority, - ScaleSetEvictionPolicy, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - ResourceIdentityType, - ManagedClusterSKUName, - ManagedClusterSKUTier, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterSKU', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'AgentPoolMode', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'ResourceIdentityType', - 'ManagedClusterSKUName', - 'ManagedClusterSKUTier', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_container_service_client_enums.py deleted file mode 100644 index de84d5d535e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,274 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - low = "Low" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_models.py deleted file mode 100644 index 574edaefa33..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_models.py +++ /dev/null @@ -1,2052 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_03_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_03_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_03_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_03_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(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(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_03_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = kwargs.get('managed', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_03_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_models_py3.py deleted file mode 100644 index 283955ed3b7..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_models_py3.py +++ /dev/null @@ -1,2052 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_03_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_03_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_03_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_03_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_03_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - self.sku = sku - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, managed: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = managed - self.admin_group_object_ids = admin_group_object_ids - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_03_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, *, balance_similar_node_groups: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, max_graceful_termination_sec: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = balance_similar_node_groups - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.max_graceful_termination_sec = max_graceful_termination_sec - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, tier=None, **kwargs) -> None: - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_paged_models.py deleted file mode 100644 index 77509d66a18..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/__init__.py deleted file mode 100644 index d1b67f7888b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_agent_pools_operations.py deleted file mode 100644 index 31502eda0fc..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,511 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-03-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_03_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_03_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_03_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_03_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_managed_clusters_operations.py deleted file mode 100644 index f54fbca2f5d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1134 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-03-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_operations.py deleted file mode 100644 index a3f40bf04b0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-03-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_03_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/version.py deleted file mode 100644 index 500c4bb0269..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-03-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/_container_service_client.py deleted file mode 100644 index 152f8b782cd..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/_container_service_client.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2020_04_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2020_04_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2020_04_01.operations.AgentPoolsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-04-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/__init__.py deleted file mode 100644 index f8c324d8029..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/__init__.py +++ /dev/null @@ -1,180 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import AgentPoolUpgradeSettings - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterSKU - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - AgentPoolMode, - ScaleSetPriority, - ScaleSetEvictionPolicy, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - ResourceIdentityType, - ManagedClusterSKUName, - ManagedClusterSKUTier, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'AgentPoolUpgradeSettings', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterSKU', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'AgentPoolMode', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'ResourceIdentityType', - 'ManagedClusterSKUName', - 'ManagedClusterSKUTier', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_container_service_client_enums.py deleted file mode 100644 index 2dc7cc068f9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,273 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_models.py deleted file mode 100644 index 27fe82d1858..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_models.py +++ /dev/null @@ -1,2099 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = kwargs.get('node_image_version', None) - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - self.latest_node_image_version = kwargs.get('latest_node_image_version', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = kwargs.get('max_surge', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_04_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_04_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_04_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_04_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(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(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_04_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = kwargs.get('managed', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = kwargs.get('node_image_version', None) - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_04_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_04_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_04_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_models_py3.py deleted file mode 100644 index f9cd56462cc..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_models_py3.py +++ /dev/null @@ -1,2099 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, node_image_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = node_image_version - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - self.latest_node_image_version = latest_node_image_version - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, *, max_surge: str=None, **kwargs) -> None: - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = max_surge - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_04_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_04_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_04_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_04_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_04_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - self.sku = sku - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, managed: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = managed - self.admin_group_object_ids = admin_group_object_ids - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, node_image_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = node_image_version - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, node_image_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, node_image_version=node_image_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_04_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_04_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_04_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, *, balance_similar_node_groups: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, max_graceful_termination_sec: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = balance_similar_node_groups - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.max_graceful_termination_sec = max_graceful_termination_sec - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, tier=None, **kwargs) -> None: - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_paged_models.py deleted file mode 100644 index a32e4c22c1b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/__init__.py deleted file mode 100644 index d1b67f7888b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_agent_pools_operations.py deleted file mode 100644 index cac05714e4d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,511 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-04-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_04_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_04_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_04_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_04_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_managed_clusters_operations.py deleted file mode 100644 index 8426985728b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-04-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_operations.py deleted file mode 100644 index 9e91e7c0321..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-04-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_04_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/version.py deleted file mode 100644 index b4a222521b4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-04-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/_container_service_client.py deleted file mode 100644 index b98faa63f24..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/_container_service_client.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from .operations import PrivateEndpointConnectionsOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2020_06_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2020_06_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2020_06_01.operations.AgentPoolsOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations - :vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_06_01.operations.PrivateEndpointConnectionsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-06-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/__init__.py deleted file mode 100644 index 37dc5be9275..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/__init__.py +++ /dev/null @@ -1,199 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import AgentPoolUpgradeSettings - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterSKU - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import PrivateEndpoint - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointConnectionListResult - from ._models_py3 import PrivateLinkServiceConnectionState - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointConnectionListResult - from ._models import PrivateLinkServiceConnectionState - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - AgentPoolMode, - ScaleSetPriority, - ScaleSetEvictionPolicy, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - ResourceIdentityType, - ManagedClusterSKUName, - ManagedClusterSKUTier, - PrivateEndpointConnectionProvisioningState, - ConnectionStatus, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'AgentPoolUpgradeSettings', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterIdentityUserAssignedIdentitiesValue', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterSKU', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'PrivateEndpoint', - 'PrivateEndpointConnection', - 'PrivateEndpointConnectionListResult', - 'PrivateLinkServiceConnectionState', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'AgentPoolMode', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'ResourceIdentityType', - 'ManagedClusterSKUName', - 'ManagedClusterSKUTier', - 'PrivateEndpointConnectionProvisioningState', - 'ConnectionStatus', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_container_service_client_enums.py deleted file mode 100644 index 6dcc936f3a4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,290 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" - - -class PrivateEndpointConnectionProvisioningState(str, Enum): - - succeeded = "Succeeded" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_models.py deleted file mode 100644 index 2610b0b3afa..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_models.py +++ /dev/null @@ -1,2255 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = kwargs.get('node_image_version', None) - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - self.latest_node_image_version = kwargs.get('latest_node_image_version', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = kwargs.get('max_surge', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_06_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_06_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_06_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_06_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(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(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_06_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = kwargs.get('managed', None) - self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = kwargs.get('node_image_version', None) - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_06_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_06_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_06_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_models_py3.py deleted file mode 100644 index 369cc817309..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_models_py3.py +++ /dev/null @@ -1,2255 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, node_image_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = node_image_version - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - self.latest_node_image_version = latest_node_image_version - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, *, max_surge: str=None, **kwargs) -> None: - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = max_surge - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_06_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_06_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_06_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_06_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_06_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - self.sku = sku - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = managed - self.enable_azure_rbac = enable_azure_rbac - self.admin_group_object_ids = admin_group_object_ids - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, node_image_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = node_image_version - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, count: int=None, vm_size=None, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, node_image_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, node_image_version=node_image_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_06_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_06_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_06_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, *, balance_similar_node_groups: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, max_graceful_termination_sec: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = balance_similar_node_groups - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.max_graceful_termination_sec = max_graceful_termination_sec - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, tier=None, **kwargs) -> None: - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = id - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_paged_models.py deleted file mode 100644 index 18a9e892f3e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/__init__.py deleted file mode 100644 index 1e7fcfbd1f0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', - 'PrivateEndpointConnectionsOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_agent_pools_operations.py deleted file mode 100644 index 0f39c0800df..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,511 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_06_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_06_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_06_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_06_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_managed_clusters_operations.py deleted file mode 100644 index 05f377e85a6..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_operations.py deleted file mode 100644 index 8cf6be2277e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_06_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index 51b9fe38f32..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,348 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private endpoint connections in the specified managed - cluster. - - Gets a list of private endpoint connections in the specified managed - cluster. The operation returns properties of each private endpoint - connection. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnectionListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} - - def get( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """Gets the private endpoint connection. - - Gets the details of the private endpoint connection by managed cluster - and resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def update( - self, resource_group_name, resource_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): - """Updates a private endpoint connection. - - Updates a private endpoint connection in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a private endpoint connection. - - Deletes the private endpoint connection in the specified managed - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/version.py deleted file mode 100644 index 589be3af5bb..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-06-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/_container_service_client.py deleted file mode 100644 index 9edc6189016..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/_container_service_client.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ResolvePrivateLinkServiceIdOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2020_09_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2020_09_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2020_09_01.operations.AgentPoolsOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations - :vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_09_01.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations - :vartype private_link_resources: azure.mgmt.containerservice.v2020_09_01.operations.PrivateLinkResourcesOperations - :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceId operations - :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2020_09_01.operations.ResolvePrivateLinkServiceIdOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-09-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/__init__.py deleted file mode 100644 index e6f8e63bc67..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/__init__.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import AgentPoolUpgradeSettings - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterSKU - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import PowerState - from ._models_py3 import PrivateEndpoint - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointConnectionListResult - from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkResourcesListResult - from ._models_py3 import PrivateLinkServiceConnectionState - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import PowerState - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointConnectionListResult - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourcesListResult - from ._models import PrivateLinkServiceConnectionState - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSDiskType, - OSType, - AgentPoolType, - AgentPoolMode, - Code, - ScaleSetPriority, - ScaleSetEvictionPolicy, - LicenseType, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - Expander, - ResourceIdentityType, - ManagedClusterSKUName, - ManagedClusterSKUTier, - PrivateEndpointConnectionProvisioningState, - ConnectionStatus, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'AgentPoolUpgradeSettings', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterIdentityUserAssignedIdentitiesValue', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterSKU', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'PowerState', - 'PrivateEndpoint', - 'PrivateEndpointConnection', - 'PrivateEndpointConnectionListResult', - 'PrivateLinkResource', - 'PrivateLinkResourcesListResult', - 'PrivateLinkServiceConnectionState', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSDiskType', - 'OSType', - 'AgentPoolType', - 'AgentPoolMode', - 'Code', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'LicenseType', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'Expander', - 'ResourceIdentityType', - 'ManagedClusterSKUName', - 'ManagedClusterSKUTier', - 'PrivateEndpointConnectionProvisioningState', - 'ConnectionStatus', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_container_service_client_enums.py deleted file mode 100644 index 05f02c62b83..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,315 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSDiskType(str, Enum): - - managed = "Managed" - ephemeral = "Ephemeral" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class Code(str, Enum): - - running = "Running" - stopped = "Stopped" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class LicenseType(str, Enum): - - none = "None" - windows_server = "Windows_Server" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class Expander(str, Enum): - - least_waste = "least-waste" - most_pods = "most-pods" - random = "random" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" - - -class PrivateEndpointConnectionProvisioningState(str, Enum): - - succeeded = "Succeeded" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_models.py deleted file mode 100644 index b72f9fef3ac..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_models.py +++ /dev/null @@ -1,2420 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - self.latest_node_image_version = kwargs.get('latest_node_image_version', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = kwargs.get('max_surge', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_09_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_09_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_09_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_09_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(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(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_09_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = kwargs.get('managed', None) - self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_09_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_09_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_09_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2020_09_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) - self.expander = kwargs.get('expander', None) - self.max_empty_bulk_delete = kwargs.get('max_empty_bulk_delete', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - self.max_total_unready_percentage = kwargs.get('max_total_unready_percentage', None) - self.new_pod_scale_up_delay = kwargs.get('new_pod_scale_up_delay', None) - self.ok_total_unready_count = kwargs.get('ok_total_unready_count', None) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.skip_nodes_with_local_storage = kwargs.get('skip_nodes_with_local_storage', None) - self.skip_nodes_with_system_pods = kwargs.get('skip_nodes_with_system_pods', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.LicenseType - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.license_type = kwargs.get('license_type', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2020_09_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PowerState, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.group_id = kwargs.get('group_id', None) - self.required_members = kwargs.get('required_members', None) - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_models_py3.py deleted file mode 100644 index 1d9e43d5bec..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_models_py3.py +++ /dev/null @@ -1,2420 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - self.latest_node_image_version = latest_node_image_version - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, *, max_surge: str=None, **kwargs) -> None: - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = max_surge - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_09_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_09_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_09_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_09_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_09_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - self.sku = sku - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = managed - self.enable_azure_rbac = enable_azure_rbac - self.admin_group_object_ids = admin_group_object_ids - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, os_disk_type=os_disk_type, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_09_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_09_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_09_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2020_09_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_empty_bulk_delete: str=None, max_graceful_termination_sec: str=None, max_total_unready_percentage: str=None, new_pod_scale_up_delay: str=None, ok_total_unready_count: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, skip_nodes_with_local_storage: str=None, skip_nodes_with_system_pods: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = balance_similar_node_groups - self.expander = expander - self.max_empty_bulk_delete = max_empty_bulk_delete - self.max_graceful_termination_sec = max_graceful_termination_sec - self.max_total_unready_percentage = max_total_unready_percentage - self.new_pod_scale_up_delay = new_pod_scale_up_delay - self.ok_total_unready_count = ok_total_unready_count - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.skip_nodes_with_local_storage = skip_nodes_with_local_storage - self.skip_nodes_with_system_pods = skip_nodes_with_system_pods - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, tier=None, **kwargs) -> None: - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.LicenseType - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, license_type=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - self.license_type = license_type - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2020_09_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, *, code=None, **kwargs) -> None: - super(PowerState, self).__init__(**kwargs) - self.code = code - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = id - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: str=None, required_members=None, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.group_id = group_id - self.required_members = required_members - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_paged_models.py deleted file mode 100644 index 9bd6710b865..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/__init__.py deleted file mode 100644 index fecbc32dd78..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations -from ._private_link_resources_operations import PrivateLinkResourcesOperations -from ._resolve_private_link_service_id_operations import ResolvePrivateLinkServiceIdOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', - 'PrivateEndpointConnectionsOperations', - 'PrivateLinkResourcesOperations', - 'ResolvePrivateLinkServiceIdOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_agent_pools_operations.py deleted file mode 100644 index eeefe4cf734..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,511 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_09_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_09_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_09_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_09_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_managed_clusters_operations.py deleted file mode 100644 index e32eeafdef3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1400 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} - - - def _stop_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stop Managed Cluster. - - Stops a Running Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} - - - def _start_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Start Managed Cluster. - - Starts a Stopped Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} - - - def _upgrade_node_image_version_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.upgrade_node_image_version.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 202: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def upgrade_node_image_version( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrade node image version of an agent pool to the latest. - - Upgrade node image version of an agent pool to the latest. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_09_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_09_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._upgrade_node_image_version_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_operations.py deleted file mode 100644 index 4598ca46e67..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_09_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index 99a30128655..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,348 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private endpoint connections in the specified managed - cluster. - - Gets a list of private endpoint connections in the specified managed - cluster. The operation returns properties of each private endpoint - connection. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnectionListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} - - def get( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """Gets the private endpoint connection. - - Gets the details of the private endpoint connection by managed cluster - and resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def update( - self, resource_group_name, resource_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): - """Updates a private endpoint connection. - - Updates a private endpoint connection in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a private endpoint connection. - - Deletes the private endpoint connection in the specified managed - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_private_link_resources_operations.py deleted file mode 100644 index 902fc5cfb0a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class PrivateLinkResourcesOperations(object): - """PrivateLinkResourcesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private link resources in the specified managed cluster. - - Gets a list of private link resources in the specified managed cluster. - The operation returns properties of each private link resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkResourcesListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_resolve_private_link_service_id_operations.py deleted file mode 100644 index 90baa4322be..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_resolve_private_link_service_id_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ResolvePrivateLinkServiceIdOperations(object): - """ResolvePrivateLinkServiceIdOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def post( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - """Gets the private link service ID for the specified managed cluster. - - Gets the private link service ID the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters (name, groupId) supplied in order to - resolve a private link service ID. - :type parameters: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.post.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateLinkResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/version.py deleted file mode 100644 index 16563e7d14c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-09-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_container_service_client.py deleted file mode 100644 index c795449f4ea..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_container_service_client.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ResolvePrivateLinkServiceIdOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2020_11_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2020_11_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2020_11_01.operations.AgentPoolsOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations - :vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_11_01.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations - :vartype private_link_resources: azure.mgmt.containerservice.v2020_11_01.operations.PrivateLinkResourcesOperations - :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceId operations - :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2020_11_01.operations.ResolvePrivateLinkServiceIdOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-11-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/__init__.py deleted file mode 100644 index babb4e3ed61..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/__init__.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import AgentPoolUpgradeSettings - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import KubeletConfig - from ._models_py3 import LinuxOSConfig - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterAutoUpgradeProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPodIdentity - from ._models_py3 import ManagedClusterPodIdentityException - from ._models_py3 import ManagedClusterPodIdentityProfile - from ._models_py3 import ManagedClusterPodIdentityProvisioningInfo - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterSKU - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import PowerState - from ._models_py3 import PrivateEndpoint - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointConnectionListResult - from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkResourcesListResult - from ._models_py3 import PrivateLinkServiceConnectionState - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import SysctlConfig - from ._models_py3 import TagsObject - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import KubeletConfig - from ._models import LinuxOSConfig - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterAutoUpgradeProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPodIdentity - from ._models import ManagedClusterPodIdentityException - from ._models import ManagedClusterPodIdentityProfile - from ._models import ManagedClusterPodIdentityProvisioningInfo - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import PowerState - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointConnectionListResult - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourcesListResult - from ._models import PrivateLinkServiceConnectionState - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import SysctlConfig - from ._models import TagsObject - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSDiskType, - OSType, - AgentPoolType, - AgentPoolMode, - Code, - ScaleSetPriority, - ScaleSetEvictionPolicy, - LicenseType, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - ManagedClusterPodIdentityProvisioningState, - UpgradeChannel, - Expander, - ResourceIdentityType, - ManagedClusterSKUName, - ManagedClusterSKUTier, - PrivateEndpointConnectionProvisioningState, - ConnectionStatus, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'AgentPoolUpgradeSettings', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'KubeletConfig', - 'LinuxOSConfig', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterAutoUpgradeProfile', - 'ManagedClusterIdentity', - 'ManagedClusterIdentityUserAssignedIdentitiesValue', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPodIdentity', - 'ManagedClusterPodIdentityException', - 'ManagedClusterPodIdentityProfile', - 'ManagedClusterPodIdentityProvisioningInfo', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterSKU', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'PowerState', - 'PrivateEndpoint', - 'PrivateEndpointConnection', - 'PrivateEndpointConnectionListResult', - 'PrivateLinkResource', - 'PrivateLinkResourcesListResult', - 'PrivateLinkServiceConnectionState', - 'Resource', - 'ResourceReference', - 'SubResource', - 'SysctlConfig', - 'TagsObject', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSDiskType', - 'OSType', - 'AgentPoolType', - 'AgentPoolMode', - 'Code', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'LicenseType', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'ManagedClusterPodIdentityProvisioningState', - 'UpgradeChannel', - 'Expander', - 'ResourceIdentityType', - 'ManagedClusterSKUName', - 'ManagedClusterSKUTier', - 'PrivateEndpointConnectionProvisioningState', - 'ConnectionStatus', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_container_service_client_enums.py deleted file mode 100644 index 346a84f3900..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,331 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSDiskType(str, Enum): - - managed = "Managed" - ephemeral = "Ephemeral" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class Code(str, Enum): - - running = "Running" - stopped = "Stopped" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class LicenseType(str, Enum): - - none = "None" - windows_server = "Windows_Server" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ManagedClusterPodIdentityProvisioningState(str, Enum): - - assigned = "Assigned" - updating = "Updating" - deleting = "Deleting" - failed = "Failed" - - -class UpgradeChannel(str, Enum): - - rapid = "rapid" - stable = "stable" - patch = "patch" - none = "none" - - -class Expander(str, Enum): - - least_waste = "least-waste" - most_pods = "most-pods" - random = "random" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" - - -class PrivateEndpointConnectionProvisioningState(str, Enum): - - succeeded = "Succeeded" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models.py deleted file mode 100644 index d55b788faae..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models.py +++ /dev/null @@ -1,2856 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.pod_subnet_id = kwargs.get('pod_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - self.kubelet_config = kwargs.get('kubelet_config', None) - self.linux_os_config = kwargs.get('linux_os_config', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - self.latest_node_image_version = kwargs.get('latest_node_image_version', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = kwargs.get('max_surge', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_11_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_11_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_11_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_11_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(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(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_11_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class KubeletConfig(Model): - """Kubelet configurations of agent nodes. - - :param cpu_manager_policy: CPU Manager policy to use. - :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. - :type cpu_cfs_quota: bool - :param cpu_cfs_quota_period: Sets CPU CFS quota period value. - :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. - :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. - :type image_gc_low_threshold: int - :param topology_manager_policy: Topology Manager policy to use. - :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). - :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. - :type fail_swap_on: bool - """ - - _attribute_map = { - 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, - 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, - 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, - 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, - 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, - 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, - 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, - 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(KubeletConfig, self).__init__(**kwargs) - self.cpu_manager_policy = kwargs.get('cpu_manager_policy', None) - self.cpu_cfs_quota = kwargs.get('cpu_cfs_quota', None) - self.cpu_cfs_quota_period = kwargs.get('cpu_cfs_quota_period', None) - self.image_gc_high_threshold = kwargs.get('image_gc_high_threshold', None) - self.image_gc_low_threshold = kwargs.get('image_gc_low_threshold', None) - self.topology_manager_policy = kwargs.get('topology_manager_policy', None) - self.allowed_unsafe_sysctls = kwargs.get('allowed_unsafe_sysctls', None) - self.fail_swap_on = kwargs.get('fail_swap_on', None) - - -class LinuxOSConfig(Model): - """OS configurations of Linux agent nodes. - - :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2020_11_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. - :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. - :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. - :type swap_file_size_mb: int - """ - - _attribute_map = { - 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, - 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, - 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, - 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(LinuxOSConfig, self).__init__(**kwargs) - self.sysctls = kwargs.get('sysctls', None) - self.transparent_huge_page_enabled = kwargs.get('transparent_huge_page_enabled', None) - self.transparent_huge_page_defrag = kwargs.get('transparent_huge_page_defrag', None) - self.swap_file_size_mb = kwargs.get('swap_file_size_mb', None) - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAddonProfile] - :param pod_identity_profile: Profile of managed cluster pod identity. - :type pod_identity_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAADProfile - :param auto_upgrade_profile: Profile of auto upgrade configuration. - :type auto_upgrade_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.pod_identity_profile = kwargs.get('pod_identity_profile', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_upgrade_profile = kwargs.get('auto_upgrade_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = kwargs.get('managed', None) - self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.pod_subnet_id = kwargs.get('pod_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - self.kubelet_config = kwargs.get('kubelet_config', None) - self.linux_os_config = kwargs.get('linux_os_config', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - :param private_dns_zone: Private dns zone mode for private cluster. - :type private_dns_zone: str - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - self.private_dns_zone = kwargs.get('private_dns_zone', None) - - -class ManagedClusterAutoUpgradeProfile(Model): - """Auto upgrade profile for a managed cluster. - - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2020_11_01.models.UpgradeChannel - """ - - _attribute_map = { - 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) - self.upgrade_channel = kwargs.get('upgrade_channel', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPodIdentity(Model): - """ManagedClusterPodIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity. - :type name: str - :param namespace: Required. Namespace of the pod identity. - :type namespace: str - :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2020_11_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProvisioningState - :ivar provisioning_info: - :vartype provisioning_info: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProvisioningInfo - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'identity': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_info': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.identity = kwargs.get('identity', None) - self.provisioning_state = None - self.provisioning_info = None - - -class ManagedClusterPodIdentityException(Model): - """ManagedClusterPodIdentityException. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity exception. - :type name: str - :param namespace: Required. Namespace of the pod identity exception. - :type namespace: str - :param pod_labels: Required. Pod labels to match. - :type pod_labels: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'pod_labels': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.pod_labels = kwargs.get('pod_labels', None) - - -class ManagedClusterPodIdentityProfile(Model): - """ManagedClusterPodIdentityProfile. - - :param enabled: Whether the pod identity addon is enabled. - :type enabled: bool - :param user_assigned_identities: User assigned pod identity settings. - :type user_assigned_identities: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. - :type user_assigned_identity_exceptions: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityException] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, - 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - self.user_assigned_identity_exceptions = kwargs.get('user_assigned_identity_exceptions', None) - - -class ManagedClusterPodIdentityProvisioningInfo(Model): - """ManagedClusterPodIdentityProvisioningInfo. - - :param error: Pod identity assignment error (if any). - :type error: ~azure.mgmt.containerservice.v2020_11_01.models.CloudError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudError'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2020_11_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) - self.expander = kwargs.get('expander', None) - self.max_empty_bulk_delete = kwargs.get('max_empty_bulk_delete', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - self.max_total_unready_percentage = kwargs.get('max_total_unready_percentage', None) - self.new_pod_scale_up_delay = kwargs.get('new_pod_scale_up_delay', None) - self.ok_total_unready_count = kwargs.get('ok_total_unready_count', None) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.skip_nodes_with_local_storage = kwargs.get('skip_nodes_with_local_storage', None) - self.skip_nodes_with_system_pods = kwargs.get('skip_nodes_with_system_pods', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.LicenseType - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.license_type = kwargs.get('license_type', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2020_11_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PowerState, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.group_id = kwargs.get('group_id', None) - self.required_members = kwargs.get('required_members', None) - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class SysctlConfig(Model): - """Sysctl settings for Linux agent nodes. - - :param net_core_somaxconn: Sysctl setting net.core.somaxconn. - :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. - :type net_core_netdev_max_backlog: int - :param net_core_rmem_max: Sysctl setting net.core.rmem_max. - :type net_core_rmem_max: int - :param net_core_wmem_max: Sysctl setting net.core.wmem_max. - :type net_core_wmem_max: int - :param net_core_optmem_max: Sysctl setting net.core.optmem_max. - :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. - :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. - :type net_ipv4_tcp_max_tw_buckets: int - :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. - :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. - :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. - :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. - :type net_ipv4_tcpkeepalive_intvl: int - :param net_ipv4_tcp_rmem: Sysctl setting net.ipv4.tcp_rmem. - :type net_ipv4_tcp_rmem: int - :param net_ipv4_tcp_wmem: Sysctl setting net.ipv4.tcp_wmem. - :type net_ipv4_tcp_wmem: int - :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. - :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. - :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. - :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. - :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. - :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. - :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. - :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. - :type fs_inotify_max_user_watches: int - :param fs_file_max: Sysctl setting fs.file-max. - :type fs_file_max: int - :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. - :type fs_aio_max_nr: int - :param fs_nr_open: Sysctl setting fs.nr_open. - :type fs_nr_open: int - :param kernel_threads_max: Sysctl setting kernel.threads-max. - :type kernel_threads_max: int - :param vm_max_map_count: Sysctl setting vm.max_map_count. - :type vm_max_map_count: int - :param vm_swappiness: Sysctl setting vm.swappiness. - :type vm_swappiness: int - :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. - :type vm_vfs_cache_pressure: int - """ - - _attribute_map = { - 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, - 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, - 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, - 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, - 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, - 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, - 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, - 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, - 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, - 'net_ipv4_tcp_rmem': {'key': 'netIpv4TcpRmem', 'type': 'int'}, - 'net_ipv4_tcp_wmem': {'key': 'netIpv4TcpWmem', 'type': 'int'}, - 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, - 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, - 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, - 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, - 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, - 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, - 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, - 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, - 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, - 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, - 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, - 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, - 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SysctlConfig, self).__init__(**kwargs) - self.net_core_somaxconn = kwargs.get('net_core_somaxconn', None) - self.net_core_netdev_max_backlog = kwargs.get('net_core_netdev_max_backlog', None) - self.net_core_rmem_max = kwargs.get('net_core_rmem_max', None) - self.net_core_wmem_max = kwargs.get('net_core_wmem_max', None) - self.net_core_optmem_max = kwargs.get('net_core_optmem_max', None) - self.net_ipv4_tcp_max_syn_backlog = kwargs.get('net_ipv4_tcp_max_syn_backlog', None) - self.net_ipv4_tcp_max_tw_buckets = kwargs.get('net_ipv4_tcp_max_tw_buckets', None) - self.net_ipv4_tcp_fin_timeout = kwargs.get('net_ipv4_tcp_fin_timeout', None) - self.net_ipv4_tcp_keepalive_time = kwargs.get('net_ipv4_tcp_keepalive_time', None) - self.net_ipv4_tcp_keepalive_probes = kwargs.get('net_ipv4_tcp_keepalive_probes', None) - self.net_ipv4_tcpkeepalive_intvl = kwargs.get('net_ipv4_tcpkeepalive_intvl', None) - self.net_ipv4_tcp_rmem = kwargs.get('net_ipv4_tcp_rmem', None) - self.net_ipv4_tcp_wmem = kwargs.get('net_ipv4_tcp_wmem', None) - self.net_ipv4_tcp_tw_reuse = kwargs.get('net_ipv4_tcp_tw_reuse', None) - self.net_ipv4_ip_local_port_range = kwargs.get('net_ipv4_ip_local_port_range', None) - self.net_ipv4_neigh_default_gc_thresh1 = kwargs.get('net_ipv4_neigh_default_gc_thresh1', None) - self.net_ipv4_neigh_default_gc_thresh2 = kwargs.get('net_ipv4_neigh_default_gc_thresh2', None) - self.net_ipv4_neigh_default_gc_thresh3 = kwargs.get('net_ipv4_neigh_default_gc_thresh3', None) - self.net_netfilter_nf_conntrack_max = kwargs.get('net_netfilter_nf_conntrack_max', None) - self.net_netfilter_nf_conntrack_buckets = kwargs.get('net_netfilter_nf_conntrack_buckets', None) - self.fs_inotify_max_user_watches = kwargs.get('fs_inotify_max_user_watches', None) - self.fs_file_max = kwargs.get('fs_file_max', None) - self.fs_aio_max_nr = kwargs.get('fs_aio_max_nr', None) - self.fs_nr_open = kwargs.get('fs_nr_open', None) - self.kernel_threads_max = kwargs.get('kernel_threads_max', None) - self.vm_max_map_count = kwargs.get('vm_max_map_count', None) - self.vm_swappiness = kwargs.get('vm_swappiness', None) - self.vm_vfs_cache_pressure = kwargs.get('vm_vfs_cache_pressure', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models_py3.py deleted file mode 100644 index a74cbef4668..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models_py3.py +++ /dev/null @@ -1,2856 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.pod_subnet_id = pod_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - self.kubelet_config = kubelet_config - self.linux_os_config = linux_os_config - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - self.latest_node_image_version = latest_node_image_version - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, *, max_surge: str=None, **kwargs) -> None: - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = max_surge - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_11_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_11_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_11_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_11_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_11_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class KubeletConfig(Model): - """Kubelet configurations of agent nodes. - - :param cpu_manager_policy: CPU Manager policy to use. - :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. - :type cpu_cfs_quota: bool - :param cpu_cfs_quota_period: Sets CPU CFS quota period value. - :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. - :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. - :type image_gc_low_threshold: int - :param topology_manager_policy: Topology Manager policy to use. - :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). - :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. - :type fail_swap_on: bool - """ - - _attribute_map = { - 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, - 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, - 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, - 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, - 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, - 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, - 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, - 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, - } - - def __init__(self, *, cpu_manager_policy: str=None, cpu_cfs_quota: bool=None, cpu_cfs_quota_period: str=None, image_gc_high_threshold: int=None, image_gc_low_threshold: int=None, topology_manager_policy: str=None, allowed_unsafe_sysctls=None, fail_swap_on: bool=None, **kwargs) -> None: - super(KubeletConfig, self).__init__(**kwargs) - self.cpu_manager_policy = cpu_manager_policy - self.cpu_cfs_quota = cpu_cfs_quota - self.cpu_cfs_quota_period = cpu_cfs_quota_period - self.image_gc_high_threshold = image_gc_high_threshold - self.image_gc_low_threshold = image_gc_low_threshold - self.topology_manager_policy = topology_manager_policy - self.allowed_unsafe_sysctls = allowed_unsafe_sysctls - self.fail_swap_on = fail_swap_on - - -class LinuxOSConfig(Model): - """OS configurations of Linux agent nodes. - - :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2020_11_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. - :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. - :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. - :type swap_file_size_mb: int - """ - - _attribute_map = { - 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, - 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, - 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, - 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, - } - - def __init__(self, *, sysctls=None, transparent_huge_page_enabled: str=None, transparent_huge_page_defrag: str=None, swap_file_size_mb: int=None, **kwargs) -> None: - super(LinuxOSConfig, self).__init__(**kwargs) - self.sysctls = sysctls - self.transparent_huge_page_enabled = transparent_huge_page_enabled - self.transparent_huge_page_defrag = transparent_huge_page_defrag - self.swap_file_size_mb = swap_file_size_mb - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAddonProfile] - :param pod_identity_profile: Profile of managed cluster pod identity. - :type pod_identity_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAADProfile - :param auto_upgrade_profile: Profile of auto upgrade configuration. - :type auto_upgrade_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, pod_identity_profile=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_upgrade_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.pod_identity_profile = pod_identity_profile - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_upgrade_profile = auto_upgrade_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - self.sku = sku - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = managed - self.enable_azure_rbac = enable_azure_rbac - self.admin_group_object_ids = admin_group_object_ids - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.pod_subnet_id = pod_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - self.kubelet_config = kubelet_config - self.linux_os_config = linux_os_config - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, os_disk_type=os_disk_type, vnet_subnet_id=vnet_subnet_id, pod_subnet_id=pod_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, kubelet_config=kubelet_config, linux_os_config=linux_os_config, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - :param private_dns_zone: Private dns zone mode for private cluster. - :type private_dns_zone: str - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, private_dns_zone: str=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - self.private_dns_zone = private_dns_zone - - -class ManagedClusterAutoUpgradeProfile(Model): - """Auto upgrade profile for a managed cluster. - - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2020_11_01.models.UpgradeChannel - """ - - _attribute_map = { - 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, - } - - def __init__(self, *, upgrade_channel=None, **kwargs) -> None: - super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) - self.upgrade_channel = upgrade_channel - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPodIdentity(Model): - """ManagedClusterPodIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity. - :type name: str - :param namespace: Required. Namespace of the pod identity. - :type namespace: str - :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2020_11_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProvisioningState - :ivar provisioning_info: - :vartype provisioning_info: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProvisioningInfo - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'identity': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_info': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, - } - - def __init__(self, *, name: str, namespace: str, identity, **kwargs) -> None: - super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = name - self.namespace = namespace - self.identity = identity - self.provisioning_state = None - self.provisioning_info = None - - -class ManagedClusterPodIdentityException(Model): - """ManagedClusterPodIdentityException. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity exception. - :type name: str - :param namespace: Required. Namespace of the pod identity exception. - :type namespace: str - :param pod_labels: Required. Pod labels to match. - :type pod_labels: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'pod_labels': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, - } - - def __init__(self, *, name: str, namespace: str, pod_labels, **kwargs) -> None: - super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = name - self.namespace = namespace - self.pod_labels = pod_labels - - -class ManagedClusterPodIdentityProfile(Model): - """ManagedClusterPodIdentityProfile. - - :param enabled: Whether the pod identity addon is enabled. - :type enabled: bool - :param user_assigned_identities: User assigned pod identity settings. - :type user_assigned_identities: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. - :type user_assigned_identity_exceptions: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityException] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, - 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, - } - - def __init__(self, *, enabled: bool=None, user_assigned_identities=None, user_assigned_identity_exceptions=None, **kwargs) -> None: - super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) - self.enabled = enabled - self.user_assigned_identities = user_assigned_identities - self.user_assigned_identity_exceptions = user_assigned_identity_exceptions - - -class ManagedClusterPodIdentityProvisioningInfo(Model): - """ManagedClusterPodIdentityProvisioningInfo. - - :param error: Pod identity assignment error (if any). - :type error: ~azure.mgmt.containerservice.v2020_11_01.models.CloudError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudError'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) - self.error = error - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2020_11_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_empty_bulk_delete: str=None, max_graceful_termination_sec: str=None, max_total_unready_percentage: str=None, new_pod_scale_up_delay: str=None, ok_total_unready_count: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, skip_nodes_with_local_storage: str=None, skip_nodes_with_system_pods: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = balance_similar_node_groups - self.expander = expander - self.max_empty_bulk_delete = max_empty_bulk_delete - self.max_graceful_termination_sec = max_graceful_termination_sec - self.max_total_unready_percentage = max_total_unready_percentage - self.new_pod_scale_up_delay = new_pod_scale_up_delay - self.ok_total_unready_count = ok_total_unready_count - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.skip_nodes_with_local_storage = skip_nodes_with_local_storage - self.skip_nodes_with_system_pods = skip_nodes_with_system_pods - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, tier=None, **kwargs) -> None: - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.LicenseType - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, license_type=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - self.license_type = license_type - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2020_11_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, *, code=None, **kwargs) -> None: - super(PowerState, self).__init__(**kwargs) - self.code = code - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = id - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: str=None, required_members=None, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.group_id = group_id - self.required_members = required_members - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class SysctlConfig(Model): - """Sysctl settings for Linux agent nodes. - - :param net_core_somaxconn: Sysctl setting net.core.somaxconn. - :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. - :type net_core_netdev_max_backlog: int - :param net_core_rmem_max: Sysctl setting net.core.rmem_max. - :type net_core_rmem_max: int - :param net_core_wmem_max: Sysctl setting net.core.wmem_max. - :type net_core_wmem_max: int - :param net_core_optmem_max: Sysctl setting net.core.optmem_max. - :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. - :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. - :type net_ipv4_tcp_max_tw_buckets: int - :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. - :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. - :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. - :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. - :type net_ipv4_tcpkeepalive_intvl: int - :param net_ipv4_tcp_rmem: Sysctl setting net.ipv4.tcp_rmem. - :type net_ipv4_tcp_rmem: int - :param net_ipv4_tcp_wmem: Sysctl setting net.ipv4.tcp_wmem. - :type net_ipv4_tcp_wmem: int - :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. - :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. - :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. - :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. - :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. - :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. - :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. - :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. - :type fs_inotify_max_user_watches: int - :param fs_file_max: Sysctl setting fs.file-max. - :type fs_file_max: int - :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. - :type fs_aio_max_nr: int - :param fs_nr_open: Sysctl setting fs.nr_open. - :type fs_nr_open: int - :param kernel_threads_max: Sysctl setting kernel.threads-max. - :type kernel_threads_max: int - :param vm_max_map_count: Sysctl setting vm.max_map_count. - :type vm_max_map_count: int - :param vm_swappiness: Sysctl setting vm.swappiness. - :type vm_swappiness: int - :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. - :type vm_vfs_cache_pressure: int - """ - - _attribute_map = { - 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, - 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, - 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, - 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, - 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, - 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, - 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, - 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, - 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, - 'net_ipv4_tcp_rmem': {'key': 'netIpv4TcpRmem', 'type': 'int'}, - 'net_ipv4_tcp_wmem': {'key': 'netIpv4TcpWmem', 'type': 'int'}, - 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, - 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, - 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, - 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, - 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, - 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, - 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, - 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, - 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, - 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, - 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, - 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, - 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, - } - - def __init__(self, *, net_core_somaxconn: int=None, net_core_netdev_max_backlog: int=None, net_core_rmem_max: int=None, net_core_wmem_max: int=None, net_core_optmem_max: int=None, net_ipv4_tcp_max_syn_backlog: int=None, net_ipv4_tcp_max_tw_buckets: int=None, net_ipv4_tcp_fin_timeout: int=None, net_ipv4_tcp_keepalive_time: int=None, net_ipv4_tcp_keepalive_probes: int=None, net_ipv4_tcpkeepalive_intvl: int=None, net_ipv4_tcp_rmem: int=None, net_ipv4_tcp_wmem: int=None, net_ipv4_tcp_tw_reuse: bool=None, net_ipv4_ip_local_port_range: str=None, net_ipv4_neigh_default_gc_thresh1: int=None, net_ipv4_neigh_default_gc_thresh2: int=None, net_ipv4_neigh_default_gc_thresh3: int=None, net_netfilter_nf_conntrack_max: int=None, net_netfilter_nf_conntrack_buckets: int=None, fs_inotify_max_user_watches: int=None, fs_file_max: int=None, fs_aio_max_nr: int=None, fs_nr_open: int=None, kernel_threads_max: int=None, vm_max_map_count: int=None, vm_swappiness: int=None, vm_vfs_cache_pressure: int=None, **kwargs) -> None: - super(SysctlConfig, self).__init__(**kwargs) - self.net_core_somaxconn = net_core_somaxconn - self.net_core_netdev_max_backlog = net_core_netdev_max_backlog - self.net_core_rmem_max = net_core_rmem_max - self.net_core_wmem_max = net_core_wmem_max - self.net_core_optmem_max = net_core_optmem_max - self.net_ipv4_tcp_max_syn_backlog = net_ipv4_tcp_max_syn_backlog - self.net_ipv4_tcp_max_tw_buckets = net_ipv4_tcp_max_tw_buckets - self.net_ipv4_tcp_fin_timeout = net_ipv4_tcp_fin_timeout - self.net_ipv4_tcp_keepalive_time = net_ipv4_tcp_keepalive_time - self.net_ipv4_tcp_keepalive_probes = net_ipv4_tcp_keepalive_probes - self.net_ipv4_tcpkeepalive_intvl = net_ipv4_tcpkeepalive_intvl - self.net_ipv4_tcp_rmem = net_ipv4_tcp_rmem - self.net_ipv4_tcp_wmem = net_ipv4_tcp_wmem - self.net_ipv4_tcp_tw_reuse = net_ipv4_tcp_tw_reuse - self.net_ipv4_ip_local_port_range = net_ipv4_ip_local_port_range - self.net_ipv4_neigh_default_gc_thresh1 = net_ipv4_neigh_default_gc_thresh1 - self.net_ipv4_neigh_default_gc_thresh2 = net_ipv4_neigh_default_gc_thresh2 - self.net_ipv4_neigh_default_gc_thresh3 = net_ipv4_neigh_default_gc_thresh3 - self.net_netfilter_nf_conntrack_max = net_netfilter_nf_conntrack_max - self.net_netfilter_nf_conntrack_buckets = net_netfilter_nf_conntrack_buckets - self.fs_inotify_max_user_watches = fs_inotify_max_user_watches - self.fs_file_max = fs_file_max - self.fs_aio_max_nr = fs_aio_max_nr - self.fs_nr_open = fs_nr_open - self.kernel_threads_max = kernel_threads_max - self.vm_max_map_count = vm_max_map_count - self.vm_swappiness = vm_swappiness - self.vm_vfs_cache_pressure = vm_vfs_cache_pressure - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_paged_models.py deleted file mode 100644 index 2dcbefb96b4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/__init__.py deleted file mode 100644 index fecbc32dd78..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations -from ._private_link_resources_operations import PrivateLinkResourcesOperations -from ._resolve_private_link_service_id_operations import ResolvePrivateLinkServiceIdOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', - 'PrivateEndpointConnectionsOperations', - 'PrivateLinkResourcesOperations', - 'ResolvePrivateLinkServiceIdOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_agent_pools_operations.py deleted file mode 100644 index 20ccc2d71f6..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,610 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-11-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} - - - def _upgrade_node_image_version_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.upgrade_node_image_version.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 202: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def upgrade_node_image_version( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrade node image version of an agent pool to the latest. - - Upgrade node image version of an agent pool to the latest. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._upgrade_node_image_version_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_managed_clusters_operations.py deleted file mode 100644 index 50eeab5c613..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1301 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-11-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} - - - def _stop_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stop Managed Cluster. - - Stops a Running Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} - - - def _start_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Start Managed Cluster. - - Starts a Stopped Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_operations.py deleted file mode 100644 index 0b9096e8623..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-11-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_11_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index ee1c4f458ef..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,348 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-11-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private endpoint connections in the specified managed - cluster. - - Gets a list of private endpoint connections in the specified managed - cluster. The operation returns properties of each private endpoint - connection. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnectionListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} - - def get( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """Gets the private endpoint connection. - - Gets the details of the private endpoint connection by managed cluster - and resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def update( - self, resource_group_name, resource_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): - """Updates a private endpoint connection. - - Updates a private endpoint connection in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a private endpoint connection. - - Deletes the private endpoint connection in the specified managed - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_link_resources_operations.py deleted file mode 100644 index 0c39d2f2ae1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class PrivateLinkResourcesOperations(object): - """PrivateLinkResourcesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-11-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private link resources in the specified managed cluster. - - Gets a list of private link resources in the specified managed cluster. - The operation returns properties of each private link resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResourcesListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_resolve_private_link_service_id_operations.py deleted file mode 100644 index 57ab2473c14..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_resolve_private_link_service_id_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ResolvePrivateLinkServiceIdOperations(object): - """ResolvePrivateLinkServiceIdOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-11-01" - - self.config = config - - def post( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - """Gets the private link service ID for the specified managed cluster. - - Gets the private link service ID the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters (name, groupId) supplied in order to - resolve a private link service ID. - :type parameters: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.post.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateLinkResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/version.py deleted file mode 100644 index 12be8e5cdee..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-11-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/__init__.py old mode 100644 new mode 100755 index b7cb9d01cb1..eb3d7ba7a26 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/__init__.py @@ -1,19 +1,16 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._configuration import ContainerServiceClientConfiguration from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION +__all__ = ['ContainerServiceClient'] +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_configuration.py old mode 100644 new mode 100755 index e94fbc7005d..df9ec3d69a1 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_configuration.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_configuration.py @@ -1,50 +1,70 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration -from .version import VERSION +from typing import TYPE_CHECKING +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient Note that all parameters used to create this instance are saved as instance attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str - :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials + self.credential = credential self.subscription_id = subscription_id + self.api_version = "2020-12-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_container_service_client.py old mode 100644 new mode 100755 index 87285cca242..99757c3b160 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_container_service_client.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_container_service_client.py @@ -1,16 +1,22 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import ContainerServiceClientConfiguration from .operations import Operations @@ -23,59 +29,91 @@ from . import models -class ContainerServiceClient(SDKClient): +class ContainerServiceClient(object): """The Container Service Client. - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - :ivar operations: Operations operations :vartype operations: azure.mgmt.containerservice.v2020_12_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations + :ivar managed_clusters: ManagedClustersOperations operations :vartype managed_clusters: azure.mgmt.containerservice.v2020_12_01.operations.ManagedClustersOperations - :ivar maintenance_configurations: MaintenanceConfigurations operations + :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations :vartype maintenance_configurations: azure.mgmt.containerservice.v2020_12_01.operations.MaintenanceConfigurationsOperations - :ivar agent_pools: AgentPools operations + :ivar agent_pools: AgentPoolsOperations operations :vartype agent_pools: azure.mgmt.containerservice.v2020_12_01.operations.AgentPoolsOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_12_01.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations + :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.containerservice.v2020_12_01.operations.PrivateLinkResourcesOperations - :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceId operations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2020_12_01.operations.ResolvePrivateLinkServiceIdOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-12-01' self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.maintenance_configurations = MaintenanceConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> ContainerServiceClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/__init__.py old mode 100644 new mode 100755 similarity index 73% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/version.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/__init__.py index c215e51b49f..4ad2bb20096 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/version.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/__init__.py @@ -1,13 +1,10 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "4.2.2" - +from ._container_service_client import ContainerServiceClient +__all__ = ['ContainerServiceClient'] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/_configuration.py new file mode 100755 index 00000000000..f1409a83c25 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/_configuration.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2020-12-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/_container_service_client.py new file mode 100755 index 00000000000..886a31c0e7b --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/_container_service_client.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import ContainerServiceClientConfiguration +from .operations import Operations +from .operations import ManagedClustersOperations +from .operations import MaintenanceConfigurationsOperations +from .operations import AgentPoolsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import ResolvePrivateLinkServiceIdOperations +from .. import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2020_12_01.aio.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: azure.mgmt.containerservice.v2020_12_01.aio.operations.ManagedClustersOperations + :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations + :vartype maintenance_configurations: azure.mgmt.containerservice.v2020_12_01.aio.operations.MaintenanceConfigurationsOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: azure.mgmt.containerservice.v2020_12_01.aio.operations.AgentPoolsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_12_01.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.containerservice.v2020_12_01.aio.operations.PrivateLinkResourcesOperations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations + :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2020_12_01.aio.operations.ResolvePrivateLinkServiceIdOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.maintenance_configurations = MaintenanceConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.agent_pools = AgentPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ContainerServiceClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/__init__.py old mode 100644 new mode 100755 similarity index 95% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/__init__.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/__init__.py index d7bfa3f00fe..3942e0ca6a0 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/__init__.py @@ -1,12 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._operations import Operations diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_agent_pools_operations.py new file mode 100755 index 00000000000..44c927942f0 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_agent_pools_operations.py @@ -0,0 +1,689 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AgentPoolsOperations: + """AgentPoolsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AgentPoolListResult"]: + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. The operation returns properties + of each agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> "_models.AgentPool": + """Gets the agent pool. + + Gets the details of the agent pool by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", + **kwargs: Any + ) -> "_models.AgentPool": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AgentPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", + **kwargs: Any + ) -> AsyncLROPoller["_models.AgentPool"]: + """Creates or updates an agent pool. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :param parameters: Parameters supplied to the Create or Update an agent pool operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an agent pool. + + Deletes the agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def get_upgrade_profile( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> "_models.AgentPoolUpgradeProfile": + """Gets upgrade profile for an agent pool. + + Gets the details of the upgrade profile for an agent pool with a specified resource group and + managed cluster name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPoolUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} # type: ignore + + async def get_available_agent_pool_versions( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.AgentPoolAvailableVersions": + """Gets a list of supported versions for the specified agent pool. + + Gets a list of supported versions for the specified agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolAvailableVersions, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolAvailableVersions + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolAvailableVersions"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_available_agent_pool_versions.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPoolAvailableVersions', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} # type: ignore + + async def _upgrade_node_image_version_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> Optional["_models.AgentPool"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AgentPool"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._upgrade_node_image_version_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _upgrade_node_image_version_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore + + async def begin_upgrade_node_image_version( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.AgentPool"]: + """Upgrade node image version of an agent pool to the latest. + + Upgrade node image version of an agent pool to the latest. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_maintenance_configurations_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_maintenance_configurations_operations.py new file mode 100755 index 00000000000..2093362e5e0 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_maintenance_configurations_operations.py @@ -0,0 +1,317 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MaintenanceConfigurationsOperations: + """MaintenanceConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_managed_cluster( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.MaintenanceConfigurationListResult"]: + """Gets a list of maintenance configurations in the specified managed cluster. + + Gets a list of maintenance configurations in the specified managed cluster. The operation + returns properties of each maintenance configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MaintenanceConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_managed_cluster.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('MaintenanceConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + **kwargs: Any + ) -> "_models.MaintenanceConfiguration": + """Gets the maintenance configuration. + + Gets the details of maintenance configurations by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: "_models.MaintenanceConfiguration", + **kwargs: Any + ) -> "_models.MaintenanceConfiguration": + """Creates or updates a maintenance configurations. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :param parameters: Parameters supplied to the Create or Update a default maintenance + configuration. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + **kwargs: Any + ) -> None: + """Deletes a maintenance configuration. + + Deletes the maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_managed_clusters_operations.py new file mode 100755 index 00000000000..5632558d944 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_managed_clusters_operations.py @@ -0,0 +1,1496 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ManagedClustersOperations: + """ManagedClustersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. The operation returns properties + of each managed cluster. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. The operation returns + properties of each managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + async def get_upgrade_profile( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.ManagedClusterUpgradeProfile": + """Gets upgrade profile for a managed cluster. + + Gets the details of the upgrade profile for a managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore + + async def get_access_profile( + self, + resource_group_name: str, + resource_name: str, + role_name: str, + **kwargs: Any + ) -> "_models.ManagedClusterAccessProfile": + """Gets an access profile of a managed cluster. + + Gets the accessProfile for the specified role name of the managed cluster with a specified + resource group and name. **WARNING**\ : This API will be deprecated. Instead use + `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_access_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore + + async def list_cluster_admin_credentials( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster admin credential of a managed cluster. + + Gets cluster admin credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore + + async def list_cluster_user_credentials( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster user credential of a managed cluster. + + Gets cluster user credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore + + async def list_cluster_monitoring_user_credentials( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster monitoring user credential of a managed cluster. + + Gets cluster monitoring user credential of the managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_monitoring_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.ManagedCluster": + """Gets a managed cluster. + + Gets the details of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedCluster", + **kwargs: Any + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedCluster", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_tags_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Updates tags on a managed cluster. + + Updates a managed cluster with the specified tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a managed cluster. + + Deletes the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _reset_service_principal_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + async def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset Service Principal Profile of a managed cluster. + + Update the service principal Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a + Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterServicePrincipalProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_service_principal_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + async def _reset_aad_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + async def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset AAD Profile of a managed cluster. + + Update the AAD Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed + Cluster. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + async def _rotate_cluster_certificates_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._rotate_cluster_certificates_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _rotate_cluster_certificates_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + async def begin_rotate_cluster_certificates( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Rotate certificates of a managed cluster. + + Rotate certificates of a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._rotate_cluster_certificates_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + async def _stop_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._stop_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore + + async def begin_stop( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Stop Managed Cluster. + + Stops a Running Managed Cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore + + async def _start_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._start_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore + + async def begin_start( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Start Managed Cluster. + + Starts a Stopped Managed Cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_operations.py new file mode 100755 index 00000000000..b667836960f --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationListResult"]: + """Gets a list of compute operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_private_endpoint_connections_operations.py new file mode 100755 index 00000000000..3571ebaa53b --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,357 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnectionListResult": + """Gets a list of private endpoint connections in the specified managed cluster. + + Gets a list of private endpoint connections in the specified managed cluster. The operation + returns properties of each private endpoint connection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnectionListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Gets the private endpoint connection. + + Gets the details of the private endpoint connection by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Updates a private endpoint connection. + + Updates a private endpoint connection in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: Parameters supplied to the Update a private endpoint connection operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a private endpoint connection. + + Deletes the private endpoint connection in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_private_link_resources_operations.py new file mode 100755 index 00000000000..c61ba658b05 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.PrivateLinkResourcesListResult": + """Gets a list of private link resources in the specified managed cluster. + + Gets a list of private link resources in the specified managed cluster. The operation returns + properties of each private link resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_resolve_private_link_service_id_operations.py new file mode 100755 index 00000000000..bbaa926aee3 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ResolvePrivateLinkServiceIdOperations: + """ResolvePrivateLinkServiceIdOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.PrivateLinkResource", + **kwargs: Any + ) -> "_models.PrivateLinkResource": + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters (name, groupId) supplied in order to resolve a private link + service ID. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.post.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateLinkResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/__init__.py old mode 100644 new mode 100755 index 2bc982b2802..c0c6aed90fb --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/__init__.py @@ -1,21 +1,24 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- try: from ._models_py3 import AgentPool from ._models_py3 import AgentPoolAvailableVersions from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem + from ._models_py3 import AgentPoolListResult from ._models_py3 import AgentPoolUpgradeProfile from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem from ._models_py3 import AgentPoolUpgradeSettings + from ._models_py3 import CloudError + from ._models_py3 import CloudErrorBody + from ._models_py3 import Components1Q1Og48SchemasManagedclusterAllof1 + from ._models_py3 import Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties + from ._models_py3 import ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties from ._models_py3 import ContainerServiceDiagnosticsProfile from ._models_py3 import ContainerServiceLinuxProfile from ._models_py3 import ContainerServiceMasterProfile @@ -28,17 +31,18 @@ from ._models_py3 import KubeletConfig from ._models_py3 import LinuxOSConfig from ._models_py3 import MaintenanceConfiguration + from ._models_py3 import MaintenanceConfigurationListResult from ._models_py3 import ManagedCluster from ._models_py3 import ManagedClusterAADProfile + from ._models_py3 import ManagedClusterAPIServerAccessProfile from ._models_py3 import ManagedClusterAccessProfile from ._models_py3 import ManagedClusterAddonProfile from ._models_py3 import ManagedClusterAddonProfileIdentity from ._models_py3 import ManagedClusterAgentPoolProfile from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile from ._models_py3 import ManagedClusterAutoUpgradeProfile from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue + from ._models_py3 import ManagedClusterListResult from ._models_py3 import ManagedClusterLoadBalancerProfile from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes @@ -50,11 +54,11 @@ from ._models_py3 import ManagedClusterPoolUpgradeProfile from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile from ._models_py3 import ManagedClusterSKU + from ._models_py3 import ManagedClusterServicePrincipalProfile from ._models_py3 import ManagedClusterUpgradeProfile from ._models_py3 import ManagedClusterWindowsProfile + from ._models_py3 import OperationListResult from ._models_py3 import OperationValue from ._models_py3 import PowerState from ._models_py3 import PrivateEndpoint @@ -73,108 +77,119 @@ from ._models_py3 import TimeSpan from ._models_py3 import UserAssignedIdentity except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import KubeletConfig - from ._models import LinuxOSConfig - from ._models import MaintenanceConfiguration - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterAutoUpgradeProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPodIdentity - from ._models import ManagedClusterPodIdentityException - from ._models import ManagedClusterPodIdentityProfile - from ._models import ManagedClusterPodIdentityProvisioningInfo - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import PowerState - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointConnectionListResult - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourcesListResult - from ._models import PrivateLinkServiceConnectionState - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import SysctlConfig - from ._models import SystemData - from ._models import TagsObject - from ._models import TimeInWeek - from ._models import TimeSpan - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import MaintenanceConfigurationPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged + from ._models import AgentPool # type: ignore + from ._models import AgentPoolAvailableVersions # type: ignore + from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem # type: ignore + from ._models import AgentPoolListResult # type: ignore + from ._models import AgentPoolUpgradeProfile # type: ignore + from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem # type: ignore + from ._models import AgentPoolUpgradeSettings # type: ignore + from ._models import CloudError # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import Components1Q1Og48SchemasManagedclusterAllof1 # type: ignore + from ._models import Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties # type: ignore + from ._models import ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties # type: ignore + from ._models import ContainerServiceDiagnosticsProfile # type: ignore + from ._models import ContainerServiceLinuxProfile # type: ignore + from ._models import ContainerServiceMasterProfile # type: ignore + from ._models import ContainerServiceNetworkProfile # type: ignore + from ._models import ContainerServiceSshConfiguration # type: ignore + from ._models import ContainerServiceSshPublicKey # type: ignore + from ._models import ContainerServiceVMDiagnostics # type: ignore + from ._models import CredentialResult # type: ignore + from ._models import CredentialResults # type: ignore + from ._models import KubeletConfig # type: ignore + from ._models import LinuxOSConfig # type: ignore + from ._models import MaintenanceConfiguration # type: ignore + from ._models import MaintenanceConfigurationListResult # type: ignore + from ._models import ManagedCluster # type: ignore + from ._models import ManagedClusterAADProfile # type: ignore + from ._models import ManagedClusterAPIServerAccessProfile # type: ignore + from ._models import ManagedClusterAccessProfile # type: ignore + from ._models import ManagedClusterAddonProfile # type: ignore + from ._models import ManagedClusterAddonProfileIdentity # type: ignore + from ._models import ManagedClusterAgentPoolProfile # type: ignore + from ._models import ManagedClusterAgentPoolProfileProperties # type: ignore + from ._models import ManagedClusterAutoUpgradeProfile # type: ignore + from ._models import ManagedClusterIdentity # type: ignore + from ._models import ManagedClusterListResult # type: ignore + from ._models import ManagedClusterLoadBalancerProfile # type: ignore + from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs # type: ignore + from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes # type: ignore + from ._models import ManagedClusterLoadBalancerProfileOutboundIPs # type: ignore + from ._models import ManagedClusterPodIdentity # type: ignore + from ._models import ManagedClusterPodIdentityException # type: ignore + from ._models import ManagedClusterPodIdentityProfile # type: ignore + from ._models import ManagedClusterPodIdentityProvisioningInfo # type: ignore + from ._models import ManagedClusterPoolUpgradeProfile # type: ignore + from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem # type: ignore + from ._models import ManagedClusterPropertiesAutoScalerProfile # type: ignore + from ._models import ManagedClusterSKU # type: ignore + from ._models import ManagedClusterServicePrincipalProfile # type: ignore + from ._models import ManagedClusterUpgradeProfile # type: ignore + from ._models import ManagedClusterWindowsProfile # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import OperationValue # type: ignore + from ._models import PowerState # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourcesListResult # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceReference # type: ignore + from ._models import SubResource # type: ignore + from ._models import SysctlConfig # type: ignore + from ._models import SystemData # type: ignore + from ._models import TagsObject # type: ignore + from ._models import TimeInWeek # type: ignore + from ._models import TimeSpan # type: ignore + from ._models import UserAssignedIdentity # type: ignore + from ._container_service_client_enums import ( + AgentPoolMode, + AgentPoolType, + Code, + ConnectionStatus, ContainerServiceStorageProfileTypes, ContainerServiceVMSizeTypes, - OSDiskType, + Count, + CreatedByType, + Expander, KubeletDiskType, - OSType, - AgentPoolType, - AgentPoolMode, - Code, - ScaleSetPriority, - ScaleSetEvictionPolicy, LicenseType, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, LoadBalancerSku, - CreatedByType, - WeekDay, ManagedClusterPodIdentityProvisioningState, - UpgradeChannel, - Expander, - ResourceIdentityType, ManagedClusterSKUName, ManagedClusterSKUTier, + NetworkMode, + NetworkPlugin, + NetworkPolicy, + OSDiskType, + OSType, + OutboundType, PrivateEndpointConnectionProvisioningState, - ConnectionStatus, + ResourceIdentityType, + ScaleSetEvictionPolicy, + ScaleSetPriority, + UpgradeChannel, + WeekDay, ) __all__ = [ 'AgentPool', 'AgentPoolAvailableVersions', 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', + 'AgentPoolListResult', 'AgentPoolUpgradeProfile', 'AgentPoolUpgradeProfilePropertiesUpgradesItem', 'AgentPoolUpgradeSettings', + 'CloudError', + 'CloudErrorBody', + 'Components1Q1Og48SchemasManagedclusterAllof1', + 'Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties', + 'ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties', 'ContainerServiceDiagnosticsProfile', 'ContainerServiceLinuxProfile', 'ContainerServiceMasterProfile', @@ -187,17 +202,18 @@ 'KubeletConfig', 'LinuxOSConfig', 'MaintenanceConfiguration', + 'MaintenanceConfigurationListResult', 'ManagedCluster', 'ManagedClusterAADProfile', + 'ManagedClusterAPIServerAccessProfile', 'ManagedClusterAccessProfile', 'ManagedClusterAddonProfile', 'ManagedClusterAddonProfileIdentity', 'ManagedClusterAgentPoolProfile', 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', 'ManagedClusterAutoUpgradeProfile', 'ManagedClusterIdentity', - 'ManagedClusterIdentityUserAssignedIdentitiesValue', + 'ManagedClusterListResult', 'ManagedClusterLoadBalancerProfile', 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', @@ -209,11 +225,11 @@ 'ManagedClusterPoolUpgradeProfile', 'ManagedClusterPoolUpgradeProfileUpgradesItem', 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', 'ManagedClusterSKU', + 'ManagedClusterServicePrincipalProfile', 'ManagedClusterUpgradeProfile', 'ManagedClusterWindowsProfile', + 'OperationListResult', 'OperationValue', 'PowerState', 'PrivateEndpoint', @@ -231,34 +247,31 @@ 'TimeInWeek', 'TimeSpan', 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'MaintenanceConfigurationPaged', - 'AgentPoolPaged', + 'AgentPoolMode', + 'AgentPoolType', + 'Code', + 'ConnectionStatus', 'ContainerServiceStorageProfileTypes', 'ContainerServiceVMSizeTypes', - 'OSDiskType', + 'Count', + 'CreatedByType', + 'Expander', 'KubeletDiskType', - 'OSType', - 'AgentPoolType', - 'AgentPoolMode', - 'Code', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', 'LicenseType', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', 'LoadBalancerSku', - 'CreatedByType', - 'WeekDay', 'ManagedClusterPodIdentityProvisioningState', - 'UpgradeChannel', - 'Expander', - 'ResourceIdentityType', 'ManagedClusterSKUName', 'ManagedClusterSKUTier', + 'NetworkMode', + 'NetworkPlugin', + 'NetworkPolicy', + 'OSDiskType', + 'OSType', + 'OutboundType', 'PrivateEndpointConnectionProvisioningState', - 'ConnectionStatus', + 'ResourceIdentityType', + 'ScaleSetEvictionPolicy', + 'ScaleSetPriority', + 'UpgradeChannel', + 'WeekDay', ] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_container_service_client_enums.py old mode 100644 new mode 100755 index 0b087718c1a..77894303644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_container_service_client_enums.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_container_service_client_enums.py @@ -1,356 +1,412 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSDiskType(str, Enum): +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AgentPoolMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """AgentPoolMode represents mode of an agent pool. + """ + + SYSTEM = "System" + USER = "User" + +class AgentPoolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """AgentPoolType represents types of an agent pool. + """ + + VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" + AVAILABILITY_SET = "AvailabilitySet" + +class Code(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tells whether the cluster is Running or Stopped + """ + + RUNNING = "Running" + STOPPED = "Stopped" + +class ConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The private link service connection status. + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + +class ContainerServiceStorageProfileTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Storage profile specifies what kind of storage used. Choose from StorageAccount and + ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. + """ + + STORAGE_ACCOUNT = "StorageAccount" + MANAGED_DISKS = "ManagedDisks" + +class ContainerServiceVMSizeTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Size of agent VMs. + """ + + STANDARD_A1 = "Standard_A1" + STANDARD_A10 = "Standard_A10" + STANDARD_A11 = "Standard_A11" + STANDARD_A1_V2 = "Standard_A1_v2" + STANDARD_A2 = "Standard_A2" + STANDARD_A2_V2 = "Standard_A2_v2" + STANDARD_A2_M_V2 = "Standard_A2m_v2" + STANDARD_A3 = "Standard_A3" + STANDARD_A4 = "Standard_A4" + STANDARD_A4_V2 = "Standard_A4_v2" + STANDARD_A4_M_V2 = "Standard_A4m_v2" + STANDARD_A5 = "Standard_A5" + STANDARD_A6 = "Standard_A6" + STANDARD_A7 = "Standard_A7" + STANDARD_A8 = "Standard_A8" + STANDARD_A8_V2 = "Standard_A8_v2" + STANDARD_A8_M_V2 = "Standard_A8m_v2" + STANDARD_A9 = "Standard_A9" + STANDARD_B2_MS = "Standard_B2ms" + STANDARD_B2_S = "Standard_B2s" + STANDARD_B4_MS = "Standard_B4ms" + STANDARD_B8_MS = "Standard_B8ms" + STANDARD_D1 = "Standard_D1" + STANDARD_D11 = "Standard_D11" + STANDARD_D11_V2 = "Standard_D11_v2" + STANDARD_D11_V2_PROMO = "Standard_D11_v2_Promo" + STANDARD_D12 = "Standard_D12" + STANDARD_D12_V2 = "Standard_D12_v2" + STANDARD_D12_V2_PROMO = "Standard_D12_v2_Promo" + STANDARD_D13 = "Standard_D13" + STANDARD_D13_V2 = "Standard_D13_v2" + STANDARD_D13_V2_PROMO = "Standard_D13_v2_Promo" + STANDARD_D14 = "Standard_D14" + STANDARD_D14_V2 = "Standard_D14_v2" + STANDARD_D14_V2_PROMO = "Standard_D14_v2_Promo" + STANDARD_D15_V2 = "Standard_D15_v2" + STANDARD_D16_V3 = "Standard_D16_v3" + STANDARD_D16_S_V3 = "Standard_D16s_v3" + STANDARD_D1_V2 = "Standard_D1_v2" + STANDARD_D2 = "Standard_D2" + STANDARD_D2_V2 = "Standard_D2_v2" + STANDARD_D2_V2_PROMO = "Standard_D2_v2_Promo" + STANDARD_D2_V3 = "Standard_D2_v3" + STANDARD_D2_S_V3 = "Standard_D2s_v3" + STANDARD_D3 = "Standard_D3" + STANDARD_D32_V3 = "Standard_D32_v3" + STANDARD_D32_S_V3 = "Standard_D32s_v3" + STANDARD_D3_V2 = "Standard_D3_v2" + STANDARD_D3_V2_PROMO = "Standard_D3_v2_Promo" + STANDARD_D4 = "Standard_D4" + STANDARD_D4_V2 = "Standard_D4_v2" + STANDARD_D4_V2_PROMO = "Standard_D4_v2_Promo" + STANDARD_D4_V3 = "Standard_D4_v3" + STANDARD_D4_S_V3 = "Standard_D4s_v3" + STANDARD_D5_V2 = "Standard_D5_v2" + STANDARD_D5_V2_PROMO = "Standard_D5_v2_Promo" + STANDARD_D64_V3 = "Standard_D64_v3" + STANDARD_D64_S_V3 = "Standard_D64s_v3" + STANDARD_D8_V3 = "Standard_D8_v3" + STANDARD_D8_S_V3 = "Standard_D8s_v3" + STANDARD_DS1 = "Standard_DS1" + STANDARD_DS11 = "Standard_DS11" + STANDARD_DS11_V2 = "Standard_DS11_v2" + STANDARD_DS11_V2_PROMO = "Standard_DS11_v2_Promo" + STANDARD_DS12 = "Standard_DS12" + STANDARD_DS12_V2 = "Standard_DS12_v2" + STANDARD_DS12_V2_PROMO = "Standard_DS12_v2_Promo" + STANDARD_DS13 = "Standard_DS13" + STANDARD_DS13_2_V2 = "Standard_DS13-2_v2" + STANDARD_DS13_4_V2 = "Standard_DS13-4_v2" + STANDARD_DS13_V2 = "Standard_DS13_v2" + STANDARD_DS13_V2_PROMO = "Standard_DS13_v2_Promo" + STANDARD_DS14 = "Standard_DS14" + STANDARD_DS14_4_V2 = "Standard_DS14-4_v2" + STANDARD_DS14_8_V2 = "Standard_DS14-8_v2" + STANDARD_DS14_V2 = "Standard_DS14_v2" + STANDARD_DS14_V2_PROMO = "Standard_DS14_v2_Promo" + STANDARD_DS15_V2 = "Standard_DS15_v2" + STANDARD_DS1_V2 = "Standard_DS1_v2" + STANDARD_DS2 = "Standard_DS2" + STANDARD_DS2_V2 = "Standard_DS2_v2" + STANDARD_DS2_V2_PROMO = "Standard_DS2_v2_Promo" + STANDARD_DS3 = "Standard_DS3" + STANDARD_DS3_V2 = "Standard_DS3_v2" + STANDARD_DS3_V2_PROMO = "Standard_DS3_v2_Promo" + STANDARD_DS4 = "Standard_DS4" + STANDARD_DS4_V2 = "Standard_DS4_v2" + STANDARD_DS4_V2_PROMO = "Standard_DS4_v2_Promo" + STANDARD_DS5_V2 = "Standard_DS5_v2" + STANDARD_DS5_V2_PROMO = "Standard_DS5_v2_Promo" + STANDARD_E16_V3 = "Standard_E16_v3" + STANDARD_E16_S_V3 = "Standard_E16s_v3" + STANDARD_E2_V3 = "Standard_E2_v3" + STANDARD_E2_S_V3 = "Standard_E2s_v3" + STANDARD_E32_16_S_V3 = "Standard_E32-16s_v3" + STANDARD_E32_8_S_V3 = "Standard_E32-8s_v3" + STANDARD_E32_V3 = "Standard_E32_v3" + STANDARD_E32_S_V3 = "Standard_E32s_v3" + STANDARD_E4_V3 = "Standard_E4_v3" + STANDARD_E4_S_V3 = "Standard_E4s_v3" + STANDARD_E64_16_S_V3 = "Standard_E64-16s_v3" + STANDARD_E64_32_S_V3 = "Standard_E64-32s_v3" + STANDARD_E64_V3 = "Standard_E64_v3" + STANDARD_E64_S_V3 = "Standard_E64s_v3" + STANDARD_E8_V3 = "Standard_E8_v3" + STANDARD_E8_S_V3 = "Standard_E8s_v3" + STANDARD_F1 = "Standard_F1" + STANDARD_F16 = "Standard_F16" + STANDARD_F16_S = "Standard_F16s" + STANDARD_F16_S_V2 = "Standard_F16s_v2" + STANDARD_F1_S = "Standard_F1s" + STANDARD_F2 = "Standard_F2" + STANDARD_F2_S = "Standard_F2s" + STANDARD_F2_S_V2 = "Standard_F2s_v2" + STANDARD_F32_S_V2 = "Standard_F32s_v2" + STANDARD_F4 = "Standard_F4" + STANDARD_F4_S = "Standard_F4s" + STANDARD_F4_S_V2 = "Standard_F4s_v2" + STANDARD_F64_S_V2 = "Standard_F64s_v2" + STANDARD_F72_S_V2 = "Standard_F72s_v2" + STANDARD_F8 = "Standard_F8" + STANDARD_F8_S = "Standard_F8s" + STANDARD_F8_S_V2 = "Standard_F8s_v2" + STANDARD_G1 = "Standard_G1" + STANDARD_G2 = "Standard_G2" + STANDARD_G3 = "Standard_G3" + STANDARD_G4 = "Standard_G4" + STANDARD_G5 = "Standard_G5" + STANDARD_GS1 = "Standard_GS1" + STANDARD_GS2 = "Standard_GS2" + STANDARD_GS3 = "Standard_GS3" + STANDARD_GS4 = "Standard_GS4" + STANDARD_GS4_4 = "Standard_GS4-4" + STANDARD_GS4_8 = "Standard_GS4-8" + STANDARD_GS5 = "Standard_GS5" + STANDARD_GS5_16 = "Standard_GS5-16" + STANDARD_GS5_8 = "Standard_GS5-8" + STANDARD_H16 = "Standard_H16" + STANDARD_H16_M = "Standard_H16m" + STANDARD_H16_MR = "Standard_H16mr" + STANDARD_H16_R = "Standard_H16r" + STANDARD_H8 = "Standard_H8" + STANDARD_H8_M = "Standard_H8m" + STANDARD_L16_S = "Standard_L16s" + STANDARD_L32_S = "Standard_L32s" + STANDARD_L4_S = "Standard_L4s" + STANDARD_L8_S = "Standard_L8s" + STANDARD_M128_32_MS = "Standard_M128-32ms" + STANDARD_M128_64_MS = "Standard_M128-64ms" + STANDARD_M128_MS = "Standard_M128ms" + STANDARD_M128_S = "Standard_M128s" + STANDARD_M64_16_MS = "Standard_M64-16ms" + STANDARD_M64_32_MS = "Standard_M64-32ms" + STANDARD_M64_MS = "Standard_M64ms" + STANDARD_M64_S = "Standard_M64s" + STANDARD_NC12 = "Standard_NC12" + STANDARD_NC12_S_V2 = "Standard_NC12s_v2" + STANDARD_NC12_S_V3 = "Standard_NC12s_v3" + STANDARD_NC24 = "Standard_NC24" + STANDARD_NC24_R = "Standard_NC24r" + STANDARD_NC24_RS_V2 = "Standard_NC24rs_v2" + STANDARD_NC24_RS_V3 = "Standard_NC24rs_v3" + STANDARD_NC24_S_V2 = "Standard_NC24s_v2" + STANDARD_NC24_S_V3 = "Standard_NC24s_v3" + STANDARD_NC6 = "Standard_NC6" + STANDARD_NC6_S_V2 = "Standard_NC6s_v2" + STANDARD_NC6_S_V3 = "Standard_NC6s_v3" + STANDARD_ND12_S = "Standard_ND12s" + STANDARD_ND24_RS = "Standard_ND24rs" + STANDARD_ND24_S = "Standard_ND24s" + STANDARD_ND6_S = "Standard_ND6s" + STANDARD_NV12 = "Standard_NV12" + STANDARD_NV24 = "Standard_NV24" + STANDARD_NV6 = "Standard_NV6" + +class Count(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): + """Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The + default value is 1. + """ + + ONE = 1 + THREE = 3 + FIVE = 5 + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class Expander(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + LEAST_WASTE = "least-waste" + MOST_PODS = "most-pods" + PRIORITY = "priority" + RANDOM = "random" + +class KubeletDiskType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """KubeletDiskType determines the placement of emptyDir volumes, container runtime data root, and + Kubelet ephemeral storage. Currently allows one value, OS, resulting in Kubelet using the OS + disk for data. + """ + + OS = "OS" + +class LicenseType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User + Benefits for Windows VMs. + """ + + NONE = "None" + WINDOWS_SERVER = "Windows_Server" + +class LoadBalancerSku(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The load balancer sku for the managed cluster. + """ + + STANDARD = "standard" + BASIC = "basic" + +class ManagedClusterPodIdentityProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state of the pod identity. + """ + + ASSIGNED = "Assigned" + UPDATING = "Updating" + DELETING = "Deleting" + FAILED = "Failed" + +class ManagedClusterSKUName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of a managed cluster SKU. + """ + + BASIC = "Basic" + +class ManagedClusterSKUTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tier of a managed cluster SKU. + """ + + PAID = "Paid" + FREE = "Free" + +class NetworkMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network mode used for building Kubernetes network. + """ + + TRANSPARENT = "transparent" + BRIDGE = "bridge" + +class NetworkPlugin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network plugin used for building Kubernetes network. + """ + + AZURE = "azure" + KUBENET = "kubenet" + +class NetworkPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network policy used for building Kubernetes network. + """ + + CALICO = "calico" + AZURE = "azure" + +class OSDiskType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OSDiskType represents the type of an OS disk on an agent pool. + """ + + MANAGED = "Managed" + EPHEMERAL = "Ephemeral" - managed = "Managed" - ephemeral = "Ephemeral" +class OSType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + """ + LINUX = "Linux" + WINDOWS = "Windows" -class KubeletDiskType(str, Enum): +class OutboundType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The outbound (egress) routing method. + """ - os = "OS" + LOAD_BALANCER = "loadBalancer" + USER_DEFINED_ROUTING = "userDefinedRouting" +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ -class OSType(str, Enum): + SUCCEEDED = "Succeeded" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" - linux = "Linux" - windows = "Windows" +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly + created identity in master components and an auto-created user assigned identity in MC_ + resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, service + principal will be used instead. + """ + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + NONE = "None" -class AgentPoolType(str, Enum): +class ScaleSetEvictionPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale + set. Default to Delete. + """ - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" + DELETE = "Delete" + DEALLOCATE = "Deallocate" +class ScaleSetPriority(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. + """ -class AgentPoolMode(str, Enum): + SPOT = "Spot" + REGULAR = "Regular" - system = "System" - user = "User" +class UpgradeChannel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """upgrade channel for auto upgrade. + """ + RAPID = "rapid" + STABLE = "stable" + PATCH = "patch" + NONE = "none" -class Code(str, Enum): +class WeekDay(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The weekday enum. + """ - running = "Running" - stopped = "Stopped" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class LicenseType(str, Enum): - - none = "None" - windows_server = "Windows_Server" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class CreatedByType(str, Enum): - - user = "User" - application = "Application" - managed_identity = "ManagedIdentity" - key = "Key" - - -class WeekDay(str, Enum): - - sunday = "Sunday" - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" - - -class ManagedClusterPodIdentityProvisioningState(str, Enum): - - assigned = "Assigned" - updating = "Updating" - deleting = "Deleting" - failed = "Failed" - - -class UpgradeChannel(str, Enum): - - rapid = "rapid" - stable = "stable" - patch = "patch" - none = "none" - - -class Expander(str, Enum): - - least_waste = "least-waste" - most_pods = "most-pods" - priority = "priority" - random = "random" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" - - -class PrivateEndpointConnectionProvisioningState(str, Enum): - - succeeded = "Succeeded" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" + SUNDAY = "Sunday" + MONDAY = "Monday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + THURSDAY = "Thursday" + FRIDAY = "Friday" + SATURDAY = "Saturday" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models.py old mode 100644 new mode 100755 index 4637d82548b..27b37a8358b --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models.py @@ -1,30 +1,25 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError +import msrest.serialization -class SubResource(Model): +class SubResource(msrest.serialization.Model): """Reference to another subresource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str """ @@ -40,7 +35,10 @@ class SubResource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SubResource, self).__init__(**kwargs) self.id = None self.name = None @@ -50,172 +48,143 @@ def __init__(self, **kwargs): class AgentPool(SubResource): """Agent Pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or + :param type_properties_type: AgentPoolType represents types of an agent pool. Possible values + include: "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool """ @@ -223,6 +192,7 @@ class AgentPool(SubResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -244,7 +214,7 @@ class AgentPool(SubResource): 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, 'min_count': {'key': 'properties.minCount', 'type': 'int'}, 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, 'mode': {'key': 'properties.mode', 'type': 'str'}, 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, @@ -265,7 +235,10 @@ class AgentPool(SubResource): 'enable_encryption_at_host': {'key': 'properties.enableEncryptionAtHost', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPool, self).__init__(**kwargs) self.count = kwargs.get('count', None) self.vm_size = kwargs.get('vm_size', None) @@ -279,7 +252,7 @@ def __init__(self, **kwargs): self.max_count = kwargs.get('max_count', None) self.min_count = kwargs.get('min_count', None) self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) + self.type_properties_type = kwargs.get('type_properties_type', None) self.mode = kwargs.get('mode', None) self.orchestrator_version = kwargs.get('orchestrator_version', None) self.node_image_version = None @@ -290,7 +263,7 @@ def __init__(self, **kwargs): self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) + self.spot_max_price = kwargs.get('spot_max_price', -1) self.tags = kwargs.get('tags', None) self.node_labels = kwargs.get('node_labels', None) self.node_taints = kwargs.get('node_taints', None) @@ -300,11 +273,10 @@ def __init__(self, **kwargs): self.enable_encryption_at_host = kwargs.get('enable_encryption_at_host', None) -class AgentPoolAvailableVersions(Model): +class AgentPoolAvailableVersions(msrest.serialization.Model): """The list of available versions for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Id of the agent pool available versions. :vartype id: str @@ -330,7 +302,10 @@ class AgentPoolAvailableVersions(Model): 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolAvailableVersions, self).__init__(**kwargs) self.id = None self.name = None @@ -338,7 +313,7 @@ def __init__(self, **kwargs): self.agent_pool_versions = kwargs.get('agent_pool_versions', None) -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): +class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(msrest.serialization.Model): """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. :param default: Whether this version is the default agent pool version. @@ -355,18 +330,49 @@ class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) self.default = kwargs.get('default', None) self.kubernetes_version = kwargs.get('kubernetes_version', None) self.is_preview = kwargs.get('is_preview', None) -class AgentPoolUpgradeProfile(Model): +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class AgentPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -376,20 +382,16 @@ class AgentPoolUpgradeProfile(Model): :vartype name: str :ivar type: Type of the agent pool upgrade profile. :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. + :param latest_node_image_version: LatestNodeImageVersion is the latest AKS supported node image + version. :type latest_node_image_version: str """ @@ -411,18 +413,21 @@ class AgentPoolUpgradeProfile(Model): 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.kubernetes_version = kwargs['kubernetes_version'] self.os_type = kwargs.get('os_type', "Linux") self.upgrades = kwargs.get('upgrades', None) self.latest_node_image_version = kwargs.get('latest_node_image_version', None) -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): +class AgentPoolUpgradeProfilePropertiesUpgradesItem(msrest.serialization.Model): """AgentPoolUpgradeProfilePropertiesUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -436,17 +441,20 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kwargs.get('kubernetes_version', None) self.is_preview = kwargs.get('is_preview', None) -class AgentPoolUpgradeSettings(Model): +class AgentPoolUpgradeSettings(msrest.serialization.Model): """Settings for upgrading an agentpool. - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default + :param max_surge: Count or percentage of additional nodes to be added during upgrade. If empty + uses AKS default. :type max_surge: str """ @@ -454,55 +462,47 @@ class AgentPoolUpgradeSettings(Model): 'max_surge': {'key': 'maxSurge', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolUpgradeSettings, self).__init__(**kwargs) self.max_surge = kwargs.get('max_surge', None) -class CloudError(Model): +class CloudError(msrest.serialization.Model): """An error response from the Container service. :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody + :type error: ~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody """ _attribute_map = { 'error': {'key': 'error', 'type': 'CloudErrorBody'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CloudError, self).__init__(**kwargs) self.error = kwargs.get('error', None) -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): +class CloudErrorBody(msrest.serialization.Model): """An error response from the Container service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: A message describing the error, intended to be suitable for display in a user + interface. :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. + :param target: The target of the particular error. For example, the name of the property in + error. :type target: str :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody] + :type details: list[~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody] """ _attribute_map = { @@ -512,7 +512,10 @@ class CloudErrorBody(Model): 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CloudErrorBody, self).__init__(**kwargs) self.code = kwargs.get('code', None) self.message = kwargs.get('message', None) @@ -520,13 +523,230 @@ def __init__(self, **kwargs): self.details = kwargs.get('details', None) -class ContainerServiceDiagnosticsProfile(Model): +class Components1Q1Og48SchemasManagedclusterAllof1(msrest.serialization.Model): + """Components1Q1Og48SchemasManagedclusterAllof1. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :ivar private_fqdn: FQDN of private cluster. + :vartype private_fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAddonProfile] + :param pod_identity_profile: Profile of managed cluster pod identity. + :type pod_identity_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityProfile + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile + :param auto_upgrade_profile: Profile of auto upgrade configuration. + :type auto_upgrade_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAutoUpgradeProfile + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :type auto_scaler_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPropertiesAutoScalerProfile + :param api_server_access_profile: Access profile for managed cluster API server. + :type api_server_access_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAPIServerAccessProfile + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. + :type disk_encryption_set_id: str + :param identity_profile: Identities associated with the cluster. + :type identity_profile: dict[str, + ~azure.mgmt.containerservice.v2020_12_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'private_fqdn': {'readonly': True}, + } + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, + 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, + 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, + 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Q1Og48SchemasManagedclusterAllof1, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.dns_prefix = kwargs.get('dns_prefix', None) + self.fqdn = None + self.private_fqdn = None + self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.linux_profile = kwargs.get('linux_profile', None) + self.windows_profile = kwargs.get('windows_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.addon_profiles = kwargs.get('addon_profiles', None) + self.pod_identity_profile = kwargs.get('pod_identity_profile', None) + self.node_resource_group = kwargs.get('node_resource_group', None) + self.enable_rbac = kwargs.get('enable_rbac', None) + self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) + self.network_profile = kwargs.get('network_profile', None) + self.aad_profile = kwargs.get('aad_profile', None) + self.auto_upgrade_profile = kwargs.get('auto_upgrade_profile', None) + self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) + self.api_server_access_profile = kwargs.get('api_server_access_profile', None) + self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) + self.identity_profile = kwargs.get('identity_profile', None) + + +class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedIdentity(msrest.serialization.Model): + """UserAssignedIdentity. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.client_id = kwargs.get('client_id', None) + self.object_id = kwargs.get('object_id', None) + + +class ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties(UserAssignedIdentity): + """ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties, self).__init__(**kwargs) + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): """Profile for diagnostics on the container service cluster. All required parameters must be populated in order to send to Azure. - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. :type vm_diagnostics: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMDiagnostics """ @@ -539,23 +759,23 @@ class ContainerServiceDiagnosticsProfile(Model): 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) + self.vm_diagnostics = kwargs['vm_diagnostics'] -class ContainerServiceLinuxProfile(Model): +class ContainerServiceLinuxProfile(msrest.serialization.Model): """Profile for Linux VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. The administrator username to use for - Linux VMs. + :param admin_username: Required. The administrator username to use for Linux VMs. :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceSshConfiguration + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceSshConfiguration """ _validation = { @@ -568,93 +788,79 @@ class ContainerServiceLinuxProfile(Model): 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) + self.admin_username = kwargs['admin_username'] + self.ssh = kwargs['ssh'] -class ContainerServiceMasterProfile(Model): +class ContainerServiceMasterProfile(msrest.serialization.Model): """Profile for the container service master. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2020_12_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". :type storage_profile: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceStorageProfileTypes :ivar fqdn: FQDN for the master pool. @@ -664,6 +870,7 @@ class ContainerServiceMasterProfile(Model): _validation = { 'dns_prefix': {'required': True}, 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'fqdn': {'readonly': True}, } @@ -678,11 +885,14 @@ class ContainerServiceMasterProfile(Model): 'fqdn': {'key': 'fqdn', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) + self.count = kwargs.get('count', "1") + self.dns_prefix = kwargs['dns_prefix'] + self.vm_size = kwargs['vm_size'] self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") @@ -690,46 +900,35 @@ def __init__(self, **kwargs): self.fqdn = None -class ContainerServiceNetworkProfile(Model): +class ContainerServiceNetworkProfile(msrest.serialization.Model): """Profile of network configuration. - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . + :param network_plugin: Network plugin used for building Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPolicy + :param network_mode: Network mode used for building Kubernetes network. Possible values + include: "transparent", "bridge". + :type network_mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.NetworkMode + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_12_01.models.LoadBalancerSku + :param outbound_type: The outbound (egress) routing method. Possible values include: + "loadBalancer", "userDefinedRouting". Default value: "loadBalancer". + :type outbound_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OutboundType + :param load_balancer_sku: The load balancer sku for the managed cluster. Possible values + include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2020_12_01.models.LoadBalancerSku :param load_balancer_profile: Profile of the cluster load balancer. :type load_balancer_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfile @@ -755,7 +954,10 @@ class ContainerServiceNetworkProfile(Model): 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceNetworkProfile, self).__init__(**kwargs) self.network_plugin = kwargs.get('network_plugin', "kubenet") self.network_policy = kwargs.get('network_policy', None) @@ -769,13 +971,13 @@ def __init__(self, **kwargs): self.load_balancer_profile = kwargs.get('load_balancer_profile', None) -class ContainerServiceSshConfiguration(Model): +class ContainerServiceSshConfiguration(msrest.serialization.Model): """SSH configuration for Linux-based VMs running on Azure. All required parameters must be populated in order to send to Azure. - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. :type public_keys: list[~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceSshPublicKey] """ @@ -788,19 +990,21 @@ class ContainerServiceSshConfiguration(Model): 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) + self.public_keys = kwargs['public_keys'] -class ContainerServiceSshPublicKey(Model): +class ContainerServiceSshPublicKey(msrest.serialization.Model): """Contains information about SSH certificate public key data. All required parameters must be populated in order to send to Azure. - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. :type key_data: str """ @@ -812,24 +1016,24 @@ class ContainerServiceSshPublicKey(Model): 'key_data': {'key': 'keyData', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) + self.key_data = kwargs['key_data'] -class ContainerServiceVMDiagnostics(Model): +class ContainerServiceVMDiagnostics(msrest.serialization.Model): """Profile for diagnostics on the container service VMs. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. + :ivar storage_uri: The URI of the storage account where diagnostics are stored. :vartype storage_uri: str """ @@ -843,17 +1047,19 @@ class ContainerServiceVMDiagnostics(Model): 'storage_uri': {'key': 'storageUri', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) + self.enabled = kwargs['enabled'] self.storage_uri = None -class CredentialResult(Model): +class CredentialResult(msrest.serialization.Model): """The credential result response. - Variables are only populated by the server, and will be ignored when - sending a request. + 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 @@ -871,21 +1077,22 @@ class CredentialResult(Model): 'value': {'key': 'value', 'type': 'bytearray'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CredentialResult, self).__init__(**kwargs) self.name = None self.value = None -class CredentialResults(Model): +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. + Variables are only populated by the server, and will be ignored when sending a request. :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_12_01.models.CredentialResult] + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2020_12_01.models.CredentialResult] """ _validation = { @@ -896,40 +1103,42 @@ class CredentialResults(Model): 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CredentialResults, self).__init__(**kwargs) self.kubeconfigs = None -class KubeletConfig(Model): +class KubeletConfig(msrest.serialization.Model): """Kubelet configurations of agent nodes. :param cpu_manager_policy: CPU Manager policy to use. :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. + :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that specify CPU limits. :type cpu_cfs_quota: bool :param cpu_cfs_quota_period: Sets CPU CFS quota period value. :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. + :param image_gc_high_threshold: The percent of disk usage after which image garbage collection + is always run. :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. + :param image_gc_low_threshold: The percent of disk usage before which image garbage collection + is never run. :type image_gc_low_threshold: int :param topology_manager_policy: Topology Manager policy to use. :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). + :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe sysctl patterns (ending in + ``*``\ ). :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. + :param fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled + on the node. :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. + :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before it + is rotated. :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. + :param container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. :type container_log_max_files: int :param pod_max_pids: The maximum number of processes per pod. :type pod_max_pids: int @@ -953,7 +1162,10 @@ class KubeletConfig(Model): 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(KubeletConfig, self).__init__(**kwargs) self.cpu_manager_policy = kwargs.get('cpu_manager_policy', None) self.cpu_cfs_quota = kwargs.get('cpu_cfs_quota', None) @@ -968,20 +1180,17 @@ def __init__(self, **kwargs): self.pod_max_pids = kwargs.get('pod_max_pids', None) -class LinuxOSConfig(Model): +class LinuxOSConfig(msrest.serialization.Model): """OS configurations of Linux agent nodes. :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2020_12_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. + :type sysctls: ~azure.mgmt.containerservice.v2020_12_01.models.SysctlConfig + :param transparent_huge_page_enabled: Transparent Huge Page enabled configuration. :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. + :param transparent_huge_page_defrag: Transparent Huge Page defrag configuration. :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. + :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap file will be created on + each node. :type swap_file_size_mb: int """ @@ -992,7 +1201,10 @@ class LinuxOSConfig(Model): 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(LinuxOSConfig, self).__init__(**kwargs) self.sysctls = kwargs.get('sysctls', None) self.transparent_huge_page_enabled = kwargs.get('transparent_huge_page_enabled', None) @@ -1003,25 +1215,21 @@ def __init__(self, **kwargs): class MaintenanceConfiguration(SubResource): """maintenance configuration. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2020_12_01.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2020_12_01.models.SystemData :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2020_12_01.models.TimeInWeek] + :type time_in_week: list[~azure.mgmt.containerservice.v2020_12_01.models.TimeInWeek] :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2020_12_01.models.TimeSpan] + :type not_allowed_time: list[~azure.mgmt.containerservice.v2020_12_01.models.TimeSpan] """ _validation = { @@ -1040,30 +1248,61 @@ class MaintenanceConfiguration(SubResource): 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(MaintenanceConfiguration, self).__init__(**kwargs) self.system_data = None self.time_in_week = kwargs.get('time_in_week', None) self.not_allowed_time = kwargs.get('not_allowed_time', None) -class Resource(Model): +class MaintenanceConfigurationListResult(msrest.serialization.Model): + """The response from the List maintenance configurations operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of maintenance configurations. + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration] + :ivar next_link: The URL to get the next set of maintenance configuration results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MaintenanceConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MaintenanceConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class Resource(msrest.serialization.Model): """The Resource model definition. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -1082,44 +1321,35 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = kwargs.get('location', None) + self.location = kwargs['location'] self.tags = kwargs.get('tags', None) -class ManagedCluster(Resource): +class ManagedCluster(Resource, Components1Q1Og48SchemasManagedclusterAllof1): """Managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. :type kubernetes_version: str :param dns_prefix: DNS prefix specified when creating the managed cluster. :type dns_prefix: str @@ -1130,16 +1360,14 @@ class ManagedCluster(Resource): :param agent_pool_profiles: Properties of the agent pool. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. + :param linux_profile: Profile for Linux VMs in the container service cluster. :type linux_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. + :param windows_profile: Profile for Windows VMs in the container service cluster. :type windows_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. :type service_principal_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterServicePrincipalProfile :param addon_profiles: Profile of managed cluster add-on. @@ -1148,65 +1376,62 @@ class ManagedCluster(Resource): :param pod_identity_profile: Profile of managed cluster pod identity. :type pod_identity_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. + :param node_resource_group: Name of the resource group containing agent pool nodes. :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. :type enable_pod_security_policy: bool :param network_profile: Profile of network configuration. :type network_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceNetworkProfile :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile + :type aad_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile :param auto_upgrade_profile: Profile of auto upgrade configuration. :type auto_upgrade_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. :type auto_scaler_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. + :param api_server_access_profile: Access profile for managed cluster API server. :type api_server_access_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. :type disk_encryption_set_id: str :param identity_profile: Identities associated with the cluster. :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentity + ~azure.mgmt.containerservice.v2020_12_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKU + :type sku: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKU """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, 'max_agent_pools': {'readonly': True}, 'fqdn': {'readonly': True}, 'private_fqdn': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, @@ -1229,13 +1454,21 @@ class ManagedCluster(Resource): 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedCluster, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) self.provisioning_state = None self.power_state = None self.max_agent_pools = None @@ -1259,47 +1492,53 @@ def __init__(self, **kwargs): self.api_server_access_profile = kwargs.get('api_server_access_profile', None) self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) self.sku = kwargs.get('sku', None) -class ManagedClusterAADProfile(Model): +class ManagedClusterAADProfile(msrest.serialization.Model): """AADProfile specifies attributes for Azure Active Directory integration. :param managed: Whether to enable managed AAD. :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. + :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] + :param admin_group_object_i_ds: AAD group object IDs that will have admin role of the cluster. + :type admin_group_object_i_ds: list[str] :param client_app_id: The client AAD application ID. :type client_app_id: str :param server_app_id: The server AAD application ID. :type server_app_id: str :param server_app_secret: The server AAD application secret. :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. :type tenant_id: str """ _attribute_map = { 'managed': {'key': 'managed', 'type': 'bool'}, 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, + 'admin_group_object_i_ds': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, 'tenant_id': {'key': 'tenantID', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAADProfile, self).__init__(**kwargs) self.managed = kwargs.get('managed', None) self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) + self.admin_group_object_i_ds = kwargs.get('admin_group_object_i_ds', None) self.client_app_id = kwargs.get('client_app_id', None) self.server_app_id = kwargs.get('server_app_id', None) self.server_app_secret = kwargs.get('server_app_secret', None) @@ -1309,20 +1548,19 @@ def __init__(self, **kwargs): class ManagedClusterAccessProfile(Resource): """Managed cluster Access Profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param kube_config: Base64-encoded Kubernetes configuration file. :type kube_config: bytearray @@ -1344,16 +1582,18 @@ class ManagedClusterAccessProfile(Resource): 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAccessProfile, self).__init__(**kwargs) self.kube_config = kwargs.get('kube_config', None) -class ManagedClusterAddonProfile(Model): +class ManagedClusterAddonProfile(msrest.serialization.Model): """A Kubernetes add-on profile for a managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -1377,37 +1617,16 @@ class ManagedClusterAddonProfile(Model): 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) + self.enabled = kwargs['enabled'] self.config = kwargs.get('config', None) self.identity = None -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): """Information of user assigned identity used by this add-on. @@ -1425,176 +1644,150 @@ class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): 'object_id': {'key': 'objectId', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) -class ManagedClusterAgentPoolProfileProperties(Model): +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): """Properties for the container service agent pool profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool """ _validation = { + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1634,7 +1827,10 @@ class ManagedClusterAgentPoolProfileProperties(Model): 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) self.count = kwargs.get('count', None) self.vm_size = kwargs.get('vm_size', None) @@ -1659,7 +1855,7 @@ def __init__(self, **kwargs): self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) + self.spot_max_price = kwargs.get('spot_max_price', -1) self.tags = kwargs.get('tags', None) self.node_labels = kwargs.get('node_labels', None) self.node_taints = kwargs.get('node_taints', None) @@ -1672,174 +1868,145 @@ def __init__(self, **kwargs): class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): """Profile for the container service agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. :type name: str """ _validation = { + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1881,19 +2048,20 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) + self.name = kwargs['name'] -class ManagedClusterAPIServerAccessProfile(Model): +class ManagedClusterAPIServerAccessProfile(msrest.serialization.Model): """Access profile for managed cluster API server. - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. + :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. + :param enable_private_cluster: Whether to create the cluster as a private cluster or not. :type enable_private_cluster: bool :param private_dns_zone: Private dns zone mode for private cluster. :type private_dns_zone: str @@ -1905,58 +2073,59 @@ class ManagedClusterAPIServerAccessProfile(Model): 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) self.enable_private_cluster = kwargs.get('enable_private_cluster', None) self.private_dns_zone = kwargs.get('private_dns_zone', None) -class ManagedClusterAutoUpgradeProfile(Model): +class ManagedClusterAutoUpgradeProfile(msrest.serialization.Model): """Auto upgrade profile for a managed cluster. - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2020_12_01.models.UpgradeChannel + :param upgrade_channel: upgrade channel for auto upgrade. Possible values include: "rapid", + "stable", "patch", "none". + :type upgrade_channel: str or ~azure.mgmt.containerservice.v2020_12_01.models.UpgradeChannel """ _attribute_map = { 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) self.upgrade_channel = kwargs.get('upgrade_channel', None) -class ManagedClusterIdentity(Model): +class ManagedClusterIdentity(msrest.serialization.Model): """Identity for the managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: + :param type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use + an implicitly created identity in master components and an auto-created user assigned identity + in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, + service principal will be used instead. Possible values include: "SystemAssigned", + "UserAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2020_12_01.models.ResourceIdentityType + :param user_assigned_identities: The user identity associated with the managed cluster. This + identity will be used in control plane and only one user assigned identity is allowed. The user + identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] + ~azure.mgmt.containerservice.v2020_12_01.models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties] """ _validation = { @@ -1967,11 +2136,14 @@ class ManagedClusterIdentity(Model): _attribute_map = { 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None @@ -1979,61 +2151,58 @@ def __init__(self, **kwargs): self.user_assigned_identities = kwargs.get('user_assigned_identities', None) -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str """ _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, + 'next_link': {'readonly': True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, **kwargs): - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None + def __init__( + self, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None -class ManagedClusterLoadBalancerProfile(Model): +class ManagedClusterLoadBalancerProfile(msrest.serialization.Model): """Profile of the managed cluster load balancer. - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: + :param managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :type managed_outbound_i_ps: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. + :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load + balancer. :type outbound_ip_prefixes: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: + :param outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :type outbound_i_ps: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: + :param effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :type effective_outbound_i_ps: list[~azure.mgmt.containerservice.v2020_12_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . + :param allocated_outbound_ports: Desired number of allocated SNAT ports per VM. Allowed values + must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure + dynamically allocating ports. :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . + :param idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. :type idle_timeout_in_minutes: int """ @@ -2043,30 +2212,32 @@ class ManagedClusterLoadBalancerProfile(Model): } _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, + 'managed_outbound_i_ps': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, + 'outbound_i_ps': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, + 'effective_outbound_i_ps': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) + self.managed_outbound_i_ps = kwargs.get('managed_outbound_i_ps', None) self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) + self.outbound_i_ps = kwargs.get('outbound_i_ps', None) + self.effective_outbound_i_ps = kwargs.get('effective_outbound_i_ps', None) self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileManagedOutboundIPs(msrest.serialization.Model): """Desired managed outbound IPs for the cluster load balancer. - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . + :param count: Desired number of outbound IP created/managed by Azure for the cluster load + balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. :type count: int """ @@ -2078,12 +2249,15 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): 'count': {'key': 'count', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) self.count = kwargs.get('count', 1) -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): +class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(msrest.serialization.Model): """Desired outbound IP Prefix resources for the cluster load balancer. :param public_ip_prefixes: A list of public IP prefix resources. @@ -2095,33 +2269,37 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileOutboundIPs(msrest.serialization.Model): """Desired outbound IP resources for the cluster load balancer. - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_12_01.models.ResourceReference] + :param public_i_ps: A list of public IP resources. + :type public_i_ps: list[~azure.mgmt.containerservice.v2020_12_01.models.ResourceReference] """ _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, + 'public_i_ps': {'key': 'publicIPs', 'type': '[ResourceReference]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) + self.public_i_ps = kwargs.get('public_i_ps', None) -class ManagedClusterPodIdentity(Model): +class ManagedClusterPodIdentity(msrest.serialization.Model): """ManagedClusterPodIdentity. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2130,11 +2308,9 @@ class ManagedClusterPodIdentity(Model): :param namespace: Required. Namespace of the pod identity. :type namespace: str :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2020_12_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' + :type identity: ~azure.mgmt.containerservice.v2020_12_01.models.UserAssignedIdentity + :ivar provisioning_state: The current provisioning state of the pod identity. Possible values + include: "Assigned", "Updating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityProvisioningState :ivar provisioning_info: @@ -2158,16 +2334,19 @@ class ManagedClusterPodIdentity(Model): 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.identity = kwargs.get('identity', None) + self.name = kwargs['name'] + self.namespace = kwargs['namespace'] + self.identity = kwargs['identity'] self.provisioning_state = None self.provisioning_info = None -class ManagedClusterPodIdentityException(Model): +class ManagedClusterPodIdentityException(msrest.serialization.Model): """ManagedClusterPodIdentityException. All required parameters must be populated in order to send to Azure. @@ -2192,14 +2371,17 @@ class ManagedClusterPodIdentityException(Model): 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.pod_labels = kwargs.get('pod_labels', None) + self.name = kwargs['name'] + self.namespace = kwargs['namespace'] + self.pod_labels = kwargs['pod_labels'] -class ManagedClusterPodIdentityProfile(Model): +class ManagedClusterPodIdentityProfile(msrest.serialization.Model): """ManagedClusterPodIdentityProfile. :param enabled: Whether the pod identity addon is enabled. @@ -2207,8 +2389,7 @@ class ManagedClusterPodIdentityProfile(Model): :param user_assigned_identities: User assigned pod identity settings. :type user_assigned_identities: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. + :param user_assigned_identity_exceptions: User assigned pod identity exception settings. :type user_assigned_identity_exceptions: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityException] """ @@ -2219,14 +2400,17 @@ class ManagedClusterPodIdentityProfile(Model): 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) self.enabled = kwargs.get('enabled', None) self.user_assigned_identities = kwargs.get('user_assigned_identities', None) self.user_assigned_identity_exceptions = kwargs.get('user_assigned_identity_exceptions', None) -class ManagedClusterPodIdentityProvisioningInfo(Model): +class ManagedClusterPodIdentityProvisioningInfo(msrest.serialization.Model): """ManagedClusterPodIdentityProvisioningInfo. :param error: Pod identity assignment error (if any). @@ -2237,28 +2421,27 @@ class ManagedClusterPodIdentityProvisioningInfo(Model): 'error': {'key': 'error', 'type': 'CloudError'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) self.error = kwargs.get('error', None) -class ManagedClusterPoolUpgradeProfile(Model): +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrade versions. All required parameters must be populated in order to send to Azure. - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str :param name: Pool name. :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] """ @@ -2275,15 +2458,18 @@ class ManagedClusterPoolUpgradeProfile(Model): 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.kubernetes_version = kwargs['kubernetes_version'] self.name = kwargs.get('name', None) self.os_type = kwargs.get('os_type', "Linux") self.upgrades = kwargs.get('upgrades', None) -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): """ManagedClusterPoolUpgradeProfileUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -2297,21 +2483,22 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kwargs.get('kubernetes_version', None) self.is_preview = kwargs.get('is_preview', None) -class ManagedClusterPropertiesAutoScalerProfile(Model): +class ManagedClusterPropertiesAutoScalerProfile(msrest.serialization.Model): """Parameters to be applied to the cluster-autoscaler when enabled. :param balance_similar_node_groups: :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2020_12_01.models.Expander + :param expander: Possible values include: "least-waste", "most-pods", "priority", "random". + :type expander: str or ~azure.mgmt.containerservice.v2020_12_01.models.Expander :param max_empty_bulk_delete: :type max_empty_bulk_delete: str :param max_graceful_termination_sec: @@ -2364,7 +2551,10 @@ class ManagedClusterPropertiesAutoScalerProfile(Model): 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) self.expander = kwargs.get('expander', None) @@ -2385,37 +2575,14 @@ def __init__(self, **kwargs): self.skip_nodes_with_system_pods = kwargs.get('skip_nodes_with_system_pods', None) -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. All required parameters must be populated in order to send to Azure. :param client_id: Required. The ID for the service principal. :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. + :param secret: The secret password associated with the service principal in plain text. :type secret: str """ @@ -2428,23 +2595,22 @@ class ManagedClusterServicePrincipalProfile(Model): 'secret': {'key': 'secret', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) + self.client_id = kwargs['client_id'] self.secret = kwargs.get('secret', None) -class ManagedClusterSKU(Model): +class ManagedClusterSKU(msrest.serialization.Model): """ManagedClusterSKU. - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUTier + :param name: Name of a managed cluster SKU. Possible values include: "Basic". + :type name: str or ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUName + :param tier: Tier of a managed cluster SKU. Possible values include: "Paid", "Free". + :type tier: str or ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUTier """ _attribute_map = { @@ -2452,17 +2618,19 @@ class ManagedClusterSKU(Model): 'tier': {'key': 'tier', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterSKU, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.tier = kwargs.get('tier', None) -class ManagedClusterUpgradeProfile(Model): +class ManagedClusterUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for compute pools. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2472,12 +2640,11 @@ class ManagedClusterUpgradeProfile(Model): :vartype name: str :ivar type: Type of upgrade profile. :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. :type control_plane_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPoolUpgradeProfile] """ @@ -2498,43 +2665,42 @@ class ManagedClusterUpgradeProfile(Model): 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.control_plane_profile = kwargs['control_plane_profile'] + self.agent_pool_profiles = kwargs['agent_pool_profiles'] -class ManagedClusterWindowsProfile(Model): +class ManagedClusterWindowsProfile(msrest.serialization.Model): """Profile for Windows VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.LicenseType + :param license_type: The licenseType to use for Windows VMs. Windows_Server is used to enable + Azure Hybrid User Benefits for Windows VMs. Possible values include: "None", "Windows_Server". + :type license_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.LicenseType """ _validation = { @@ -2547,18 +2713,45 @@ class ManagedClusterWindowsProfile(Model): 'license_type': {'key': 'licenseType', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) + self.admin_username = kwargs['admin_username'] self.admin_password = kwargs.get('admin_password', None) self.license_type = kwargs.get('license_type', None) -class OperationValue(Model): +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.containerservice.v2020_12_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): """Describes the properties of a Compute Operation value. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar origin: The origin of the compute operation. :vartype origin: str @@ -2592,7 +2785,10 @@ class OperationValue(Model): 'provider': {'key': 'display.provider', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(OperationValue, self).__init__(**kwargs) self.origin = None self.name = None @@ -2602,11 +2798,11 @@ def __init__(self, **kwargs): self.provider = None -class PowerState(Model): +class PowerState(msrest.serialization.Model): """Describes the Power State of the cluster. - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' + :param code: Tells whether the cluster is Running or Stopped. Possible values include: + "Running", "Stopped". :type code: str or ~azure.mgmt.containerservice.v2020_12_01.models.Code """ @@ -2614,15 +2810,18 @@ class PowerState(Model): 'code': {'key': 'code', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PowerState, self).__init__(**kwargs) self.code = kwargs.get('code', None) -class PrivateEndpoint(Model): +class PrivateEndpoint(msrest.serialization.Model): """Private endpoint which a connection belongs to. - :param id: The resource Id for private endpoint + :param id: The resource Id for private endpoint. :type id: str """ @@ -2630,18 +2829,18 @@ class PrivateEndpoint(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateEndpoint, self).__init__(**kwargs) self.id = kwargs.get('id', None) -class PrivateEndpointConnection(Model): +class PrivateEndpointConnection(msrest.serialization.Model): """A private endpoint connection. - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The ID of the private endpoint connection. :vartype id: str @@ -2649,16 +2848,14 @@ class PrivateEndpointConnection(Model): :vartype name: str :ivar type: The resource type. :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + :ivar provisioning_state: The current provisioning state. Possible values include: "Succeeded", + "Creating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnectionProvisioningState :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. + :type private_endpoint: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. :type private_link_service_connection_state: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkServiceConnectionState """ @@ -2668,7 +2865,6 @@ class PrivateEndpointConnection(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, } _attribute_map = { @@ -2680,7 +2876,10 @@ class PrivateEndpointConnection(Model): 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateEndpointConnection, self).__init__(**kwargs) self.id = None self.name = None @@ -2690,28 +2889,29 @@ def __init__(self, **kwargs): self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) -class PrivateEndpointConnectionListResult(Model): +class PrivateEndpointConnectionListResult(msrest.serialization.Model): """A list of private endpoint connections. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection] + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) self.value = kwargs.get('value', None) -class PrivateLinkResource(Model): +class PrivateLinkResource(msrest.serialization.Model): """A private link resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: The ID of the private link resource. :type id: str @@ -2721,10 +2921,10 @@ class PrivateLinkResource(Model): :type type: str :param group_id: The group ID of the resource. :type group_id: str - :param required_members: RequiredMembers of the resource + :param required_members: RequiredMembers of the resource. :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. + :ivar private_link_service_id: The private link service ID of the resource, this field is + exposed only to NRP internally. :vartype private_link_service_id: str """ @@ -2741,7 +2941,10 @@ class PrivateLinkResource(Model): 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateLinkResource, self).__init__(**kwargs) self.id = kwargs.get('id', None) self.name = kwargs.get('name', None) @@ -2751,30 +2954,31 @@ def __init__(self, **kwargs): self.private_link_service_id = None -class PrivateLinkResourcesListResult(Model): +class PrivateLinkResourcesListResult(msrest.serialization.Model): """A list of private link resources. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource] + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateLinkResourcesListResult, self).__init__(**kwargs) self.value = kwargs.get('value', None) -class PrivateLinkServiceConnectionState(Model): +class PrivateLinkServiceConnectionState(msrest.serialization.Model): """The state of a private link service connection. - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ConnectionStatus + :param status: The private link service connection status. Possible values include: "Pending", + "Approved", "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.containerservice.v2020_12_01.models.ConnectionStatus :param description: The private link service connection description. :type description: str """ @@ -2784,13 +2988,16 @@ class PrivateLinkServiceConnectionState(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) self.status = kwargs.get('status', None) self.description = kwargs.get('description', None) -class ResourceReference(Model): +class ResourceReference(msrest.serialization.Model): """A reference to an Azure resource. :param id: The fully qualified Azure resource id. @@ -2801,18 +3008,20 @@ class ResourceReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ResourceReference, self).__init__(**kwargs) self.id = kwargs.get('id', None) -class SysctlConfig(Model): +class SysctlConfig(msrest.serialization.Model): """Sysctl settings for Linux agent nodes. :param net_core_somaxconn: Sysctl setting net.core.somaxconn. :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. + :param net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. :type net_core_netdev_max_backlog: int :param net_core_rmem_default: Sysctl setting net.core.rmem_default. :type net_core_rmem_default: int @@ -2824,45 +3033,33 @@ class SysctlConfig(Model): :type net_core_wmem_max: int :param net_core_optmem_max: Sysctl setting net.core.optmem_max. :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. + :param net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. + :param net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. :type net_ipv4_tcp_max_tw_buckets: int :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. + :param net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. + :param net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. + :param net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. :type net_ipv4_tcpkeepalive_intvl: int :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. + :param net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. + :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. + :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. + :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. + :param net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. + :param net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. + :param fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. :type fs_inotify_max_user_watches: int :param fs_file_max: Sysctl setting fs.file-max. :type fs_file_max: int @@ -2911,7 +3108,10 @@ class SysctlConfig(Model): 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SysctlConfig, self).__init__(**kwargs) self.net_core_somaxconn = kwargs.get('net_core_somaxconn', None) self.net_core_netdev_max_backlog = kwargs.get('net_core_netdev_max_backlog', None) @@ -2943,27 +3143,24 @@ def __init__(self, **kwargs): self.vm_vfs_cache_pressure = kwargs.get('vm_vfs_cache_pressure', None) -class SystemData(Model): +class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. :param created_by: The identity that created the resource. :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.CreatedByType + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.CreatedByType :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime + :type created_at: ~datetime.datetime :param last_modified_by: The identity that last modified the resource. :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". :type last_modified_by_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: datetime + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime """ _attribute_map = { @@ -2975,7 +3172,10 @@ class SystemData(Model): 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SystemData, self).__init__(**kwargs) self.created_by = kwargs.get('created_by', None) self.created_by_type = kwargs.get('created_by_type', None) @@ -2985,10 +3185,10 @@ def __init__(self, **kwargs): self.last_modified_at = kwargs.get('last_modified_at', None) -class TagsObject(Model): +class TagsObject(msrest.serialization.Model): """Tags object for patch operations. - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -2996,16 +3196,19 @@ class TagsObject(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TagsObject, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) -class TimeInWeek(Model): +class TimeInWeek(msrest.serialization.Model): """Time in a week. - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + :param day: A day in a week. Possible values include: "Sunday", "Monday", "Tuesday", + "Wednesday", "Thursday", "Friday", "Saturday". :type day: str or ~azure.mgmt.containerservice.v2020_12_01.models.WeekDay :param hour_slots: hour slots in a day. :type hour_slots: list[int] @@ -3016,19 +3219,22 @@ class TimeInWeek(Model): 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TimeInWeek, self).__init__(**kwargs) self.day = kwargs.get('day', None) self.hour_slots = kwargs.get('hour_slots', None) -class TimeSpan(Model): +class TimeSpan(msrest.serialization.Model): """The time span with start and end properties. - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime + :param start: The start of a time span. + :type start: ~datetime.datetime + :param end: The end of a time span. + :type end: ~datetime.datetime """ _attribute_map = { @@ -3036,7 +3242,10 @@ class TimeSpan(Model): 'end': {'key': 'end', 'type': 'iso-8601'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TimeSpan, self).__init__(**kwargs) self.start = kwargs.get('start', None) self.end = kwargs.get('end', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models_py3.py old mode 100644 new mode 100755 index de71b315522..2b54a24fe94 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models_py3.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models_py3.py @@ -1,30 +1,30 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError +import datetime +from typing import Dict, List, Optional, Union +import msrest.serialization -class SubResource(Model): +from ._container_service_client_enums import * + + +class SubResource(msrest.serialization.Model): """Reference to another subresource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str """ @@ -40,7 +40,10 @@ class SubResource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(SubResource, self).__init__(**kwargs) self.id = None self.name = None @@ -50,172 +53,143 @@ def __init__(self, **kwargs) -> None: class AgentPool(SubResource): """Agent Pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or + :param type_properties_type: AgentPoolType represents types of an agent pool. Possible values + include: "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool """ @@ -223,6 +197,7 @@ class AgentPool(SubResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -244,7 +219,7 @@ class AgentPool(SubResource): 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, 'min_count': {'key': 'properties.minCount', 'type': 'int'}, 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, 'mode': {'key': 'properties.mode', 'type': 'str'}, 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, @@ -265,7 +240,39 @@ class AgentPool(SubResource): 'enable_encryption_at_host': {'key': 'properties.enableEncryptionAtHost', 'type': 'bool'}, } - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, **kwargs) -> None: + def __init__( + self, + *, + count: Optional[int] = None, + vm_size: Optional[Union[str, "ContainerServiceVMSizeTypes"]] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type_properties_type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + **kwargs + ): super(AgentPool, self).__init__(**kwargs) self.count = count self.vm_size = vm_size @@ -279,7 +286,7 @@ def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, self.max_count = max_count self.min_count = min_count self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type + self.type_properties_type = type_properties_type self.mode = mode self.orchestrator_version = orchestrator_version self.node_image_version = None @@ -300,11 +307,10 @@ def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, self.enable_encryption_at_host = enable_encryption_at_host -class AgentPoolAvailableVersions(Model): +class AgentPoolAvailableVersions(msrest.serialization.Model): """The list of available versions for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Id of the agent pool available versions. :vartype id: str @@ -330,7 +336,12 @@ class AgentPoolAvailableVersions(Model): 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, } - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: + def __init__( + self, + *, + agent_pool_versions: Optional[List["AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, + **kwargs + ): super(AgentPoolAvailableVersions, self).__init__(**kwargs) self.id = None self.name = None @@ -338,7 +349,7 @@ def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: self.agent_pool_versions = agent_pool_versions -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): +class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(msrest.serialization.Model): """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. :param default: Whether this version is the default agent pool version. @@ -355,18 +366,55 @@ class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: + def __init__( + self, + *, + default: Optional[bool] = None, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) self.default = default self.kubernetes_version = kubernetes_version self.is_preview = is_preview -class AgentPoolUpgradeProfile(Model): +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AgentPool"]] = None, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AgentPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -376,20 +424,16 @@ class AgentPoolUpgradeProfile(Model): :vartype name: str :ivar type: Type of the agent pool upgrade profile. :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. + :param latest_node_image_version: LatestNodeImageVersion is the latest AKS supported node image + version. :type latest_node_image_version: str """ @@ -411,7 +455,15 @@ class AgentPoolUpgradeProfile(Model): 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, } - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "OSType"] = "Linux", + upgrades: Optional[List["AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, + latest_node_image_version: Optional[str] = None, + **kwargs + ): super(AgentPoolUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None @@ -422,7 +474,7 @@ def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, l self.latest_node_image_version = latest_node_image_version -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): +class AgentPoolUpgradeProfilePropertiesUpgradesItem(msrest.serialization.Model): """AgentPoolUpgradeProfilePropertiesUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -436,17 +488,23 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kubernetes_version self.is_preview = is_preview -class AgentPoolUpgradeSettings(Model): +class AgentPoolUpgradeSettings(msrest.serialization.Model): """Settings for upgrading an agentpool. - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default + :param max_surge: Count or percentage of additional nodes to be added during upgrade. If empty + uses AKS default. :type max_surge: str """ @@ -454,55 +512,51 @@ class AgentPoolUpgradeSettings(Model): 'max_surge': {'key': 'maxSurge', 'type': 'str'}, } - def __init__(self, *, max_surge: str=None, **kwargs) -> None: + def __init__( + self, + *, + max_surge: Optional[str] = None, + **kwargs + ): super(AgentPoolUpgradeSettings, self).__init__(**kwargs) self.max_surge = max_surge -class CloudError(Model): +class CloudError(msrest.serialization.Model): """An error response from the Container service. :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody + :type error: ~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody """ _attribute_map = { 'error': {'key': 'error', 'type': 'CloudErrorBody'}, } - def __init__(self, *, error=None, **kwargs) -> None: + def __init__( + self, + *, + error: Optional["CloudErrorBody"] = None, + **kwargs + ): super(CloudError, self).__init__(**kwargs) self.error = error -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): +class CloudErrorBody(msrest.serialization.Model): """An error response from the Container service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: A message describing the error, intended to be suitable for display in a user + interface. :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. + :param target: The target of the particular error. For example, the name of the property in + error. :type target: str :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody] + :type details: list[~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody] """ _attribute_map = { @@ -512,7 +566,15 @@ class CloudErrorBody(Model): 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, } - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["CloudErrorBody"]] = None, + **kwargs + ): super(CloudErrorBody, self).__init__(**kwargs) self.code = code self.message = message @@ -520,13 +582,258 @@ def __init__(self, *, code: str=None, message: str=None, target: str=None, detai self.details = details -class ContainerServiceDiagnosticsProfile(Model): +class Components1Q1Og48SchemasManagedclusterAllof1(msrest.serialization.Model): + """Components1Q1Og48SchemasManagedclusterAllof1. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :ivar private_fqdn: FQDN of private cluster. + :vartype private_fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAddonProfile] + :param pod_identity_profile: Profile of managed cluster pod identity. + :type pod_identity_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityProfile + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile + :param auto_upgrade_profile: Profile of auto upgrade configuration. + :type auto_upgrade_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAutoUpgradeProfile + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :type auto_scaler_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPropertiesAutoScalerProfile + :param api_server_access_profile: Access profile for managed cluster API server. + :type api_server_access_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAPIServerAccessProfile + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. + :type disk_encryption_set_id: str + :param identity_profile: Identities associated with the cluster. + :type identity_profile: dict[str, + ~azure.mgmt.containerservice.v2020_12_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'private_fqdn': {'readonly': True}, + } + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, + 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, + 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, + 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + } + + def __init__( + self, + *, + identity: Optional["ManagedClusterIdentity"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + agent_pool_profiles: Optional[List["ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "ManagedClusterAddonProfile"]] = None, + pod_identity_profile: Optional["ManagedClusterPodIdentityProfile"] = None, + node_resource_group: Optional[str] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + network_profile: Optional["ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["ManagedClusterAADProfile"] = None, + auto_upgrade_profile: Optional["ManagedClusterAutoUpgradeProfile"] = None, + auto_scaler_profile: Optional["ManagedClusterPropertiesAutoScalerProfile"] = None, + api_server_access_profile: Optional["ManagedClusterAPIServerAccessProfile"] = None, + disk_encryption_set_id: Optional[str] = None, + identity_profile: Optional[Dict[str, "ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties"]] = None, + **kwargs + ): + super(Components1Q1Og48SchemasManagedclusterAllof1, self).__init__(**kwargs) + self.identity = identity + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kubernetes_version + self.dns_prefix = dns_prefix + self.fqdn = None + self.private_fqdn = None + self.agent_pool_profiles = agent_pool_profiles + self.linux_profile = linux_profile + self.windows_profile = windows_profile + self.service_principal_profile = service_principal_profile + self.addon_profiles = addon_profiles + self.pod_identity_profile = pod_identity_profile + self.node_resource_group = node_resource_group + self.enable_rbac = enable_rbac + self.enable_pod_security_policy = enable_pod_security_policy + self.network_profile = network_profile + self.aad_profile = aad_profile + self.auto_upgrade_profile = auto_upgrade_profile + self.auto_scaler_profile = auto_scaler_profile + self.api_server_access_profile = api_server_access_profile + self.disk_encryption_set_id = disk_encryption_set_id + self.identity_profile = identity_profile + + +class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedIdentity(msrest.serialization.Model): + """UserAssignedIdentity. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.resource_id = resource_id + self.client_id = client_id + self.object_id = object_id + + +class ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties(UserAssignedIdentity): + """ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): + super(ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): """Profile for diagnostics on the container service cluster. All required parameters must be populated in order to send to Azure. - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. :type vm_diagnostics: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMDiagnostics """ @@ -539,23 +846,25 @@ class ContainerServiceDiagnosticsProfile(Model): 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, } - def __init__(self, *, vm_diagnostics, **kwargs) -> None: + def __init__( + self, + *, + vm_diagnostics: "ContainerServiceVMDiagnostics", + **kwargs + ): super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) self.vm_diagnostics = vm_diagnostics -class ContainerServiceLinuxProfile(Model): +class ContainerServiceLinuxProfile(msrest.serialization.Model): """Profile for Linux VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. The administrator username to use for - Linux VMs. + :param admin_username: Required. The administrator username to use for Linux VMs. :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceSshConfiguration + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceSshConfiguration """ _validation = { @@ -568,93 +877,82 @@ class ContainerServiceLinuxProfile(Model): 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, } - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: + def __init__( + self, + *, + admin_username: str, + ssh: "ContainerServiceSshConfiguration", + **kwargs + ): super(ContainerServiceLinuxProfile, self).__init__(**kwargs) self.admin_username = admin_username self.ssh = ssh -class ContainerServiceMasterProfile(Model): +class ContainerServiceMasterProfile(msrest.serialization.Model): """Profile for the container service master. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2020_12_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". :type storage_profile: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceStorageProfileTypes :ivar fqdn: FQDN for the master pool. @@ -664,6 +962,7 @@ class ContainerServiceMasterProfile(Model): _validation = { 'dns_prefix': {'required': True}, 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'fqdn': {'readonly': True}, } @@ -678,7 +977,18 @@ class ContainerServiceMasterProfile(Model): 'fqdn': {'key': 'fqdn', 'type': 'str'}, } - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: + def __init__( + self, + *, + dns_prefix: str, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + count: Optional[Union[int, "Count"]] = "1", + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + first_consecutive_static_ip: Optional[str] = "10.240.255.5", + storage_profile: Optional[Union[str, "ContainerServiceStorageProfileTypes"]] = None, + **kwargs + ): super(ContainerServiceMasterProfile, self).__init__(**kwargs) self.count = count self.dns_prefix = dns_prefix @@ -690,46 +1000,35 @@ def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: i self.fqdn = None -class ContainerServiceNetworkProfile(Model): +class ContainerServiceNetworkProfile(msrest.serialization.Model): """Profile of network configuration. - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . + :param network_plugin: Network plugin used for building Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPolicy + :param network_mode: Network mode used for building Kubernetes network. Possible values + include: "transparent", "bridge". + :type network_mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.NetworkMode + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_12_01.models.LoadBalancerSku + :param outbound_type: The outbound (egress) routing method. Possible values include: + "loadBalancer", "userDefinedRouting". Default value: "loadBalancer". + :type outbound_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OutboundType + :param load_balancer_sku: The load balancer sku for the managed cluster. Possible values + include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2020_12_01.models.LoadBalancerSku :param load_balancer_profile: Profile of the cluster load balancer. :type load_balancer_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfile @@ -755,7 +1054,21 @@ class ContainerServiceNetworkProfile(Model): 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, } - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: + def __init__( + self, + *, + network_plugin: Optional[Union[str, "NetworkPlugin"]] = "kubenet", + network_policy: Optional[Union[str, "NetworkPolicy"]] = None, + network_mode: Optional[Union[str, "NetworkMode"]] = None, + pod_cidr: Optional[str] = "10.244.0.0/16", + service_cidr: Optional[str] = "10.0.0.0/16", + dns_service_ip: Optional[str] = "10.0.0.10", + docker_bridge_cidr: Optional[str] = "172.17.0.1/16", + outbound_type: Optional[Union[str, "OutboundType"]] = "loadBalancer", + load_balancer_sku: Optional[Union[str, "LoadBalancerSku"]] = None, + load_balancer_profile: Optional["ManagedClusterLoadBalancerProfile"] = None, + **kwargs + ): super(ContainerServiceNetworkProfile, self).__init__(**kwargs) self.network_plugin = network_plugin self.network_policy = network_policy @@ -769,13 +1082,13 @@ def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mod self.load_balancer_profile = load_balancer_profile -class ContainerServiceSshConfiguration(Model): +class ContainerServiceSshConfiguration(msrest.serialization.Model): """SSH configuration for Linux-based VMs running on Azure. All required parameters must be populated in order to send to Azure. - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. :type public_keys: list[~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceSshPublicKey] """ @@ -788,19 +1101,23 @@ class ContainerServiceSshConfiguration(Model): 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, } - def __init__(self, *, public_keys, **kwargs) -> None: + def __init__( + self, + *, + public_keys: List["ContainerServiceSshPublicKey"], + **kwargs + ): super(ContainerServiceSshConfiguration, self).__init__(**kwargs) self.public_keys = public_keys -class ContainerServiceSshPublicKey(Model): +class ContainerServiceSshPublicKey(msrest.serialization.Model): """Contains information about SSH certificate public key data. All required parameters must be populated in order to send to Azure. - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. :type key_data: str """ @@ -812,24 +1129,26 @@ class ContainerServiceSshPublicKey(Model): 'key_data': {'key': 'keyData', 'type': 'str'}, } - def __init__(self, *, key_data: str, **kwargs) -> None: + def __init__( + self, + *, + key_data: str, + **kwargs + ): super(ContainerServiceSshPublicKey, self).__init__(**kwargs) self.key_data = key_data -class ContainerServiceVMDiagnostics(Model): +class ContainerServiceVMDiagnostics(msrest.serialization.Model): """Profile for diagnostics on the container service VMs. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. + :ivar storage_uri: The URI of the storage account where diagnostics are stored. :vartype storage_uri: str """ @@ -843,17 +1162,21 @@ class ContainerServiceVMDiagnostics(Model): 'storage_uri': {'key': 'storageUri', 'type': 'str'}, } - def __init__(self, *, enabled: bool, **kwargs) -> None: + def __init__( + self, + *, + enabled: bool, + **kwargs + ): super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) self.enabled = enabled self.storage_uri = None -class CredentialResult(Model): +class CredentialResult(msrest.serialization.Model): """The credential result response. - Variables are only populated by the server, and will be ignored when - sending a request. + 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 @@ -871,21 +1194,22 @@ class CredentialResult(Model): 'value': {'key': 'value', 'type': 'bytearray'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(CredentialResult, self).__init__(**kwargs) self.name = None self.value = None -class CredentialResults(Model): +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. + Variables are only populated by the server, and will be ignored when sending a request. :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_12_01.models.CredentialResult] + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2020_12_01.models.CredentialResult] """ _validation = { @@ -896,40 +1220,42 @@ class CredentialResults(Model): 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(CredentialResults, self).__init__(**kwargs) self.kubeconfigs = None -class KubeletConfig(Model): +class KubeletConfig(msrest.serialization.Model): """Kubelet configurations of agent nodes. :param cpu_manager_policy: CPU Manager policy to use. :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. + :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that specify CPU limits. :type cpu_cfs_quota: bool :param cpu_cfs_quota_period: Sets CPU CFS quota period value. :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. + :param image_gc_high_threshold: The percent of disk usage after which image garbage collection + is always run. :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. + :param image_gc_low_threshold: The percent of disk usage before which image garbage collection + is never run. :type image_gc_low_threshold: int :param topology_manager_policy: Topology Manager policy to use. :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). + :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe sysctl patterns (ending in + ``*``\ ). :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. + :param fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled + on the node. :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. + :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before it + is rotated. :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. + :param container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. :type container_log_max_files: int :param pod_max_pids: The maximum number of processes per pod. :type pod_max_pids: int @@ -953,7 +1279,22 @@ class KubeletConfig(Model): 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, } - def __init__(self, *, cpu_manager_policy: str=None, cpu_cfs_quota: bool=None, cpu_cfs_quota_period: str=None, image_gc_high_threshold: int=None, image_gc_low_threshold: int=None, topology_manager_policy: str=None, allowed_unsafe_sysctls=None, fail_swap_on: bool=None, container_log_max_size_mb: int=None, container_log_max_files: int=None, pod_max_pids: int=None, **kwargs) -> None: + def __init__( + self, + *, + cpu_manager_policy: Optional[str] = None, + cpu_cfs_quota: Optional[bool] = None, + cpu_cfs_quota_period: Optional[str] = None, + image_gc_high_threshold: Optional[int] = None, + image_gc_low_threshold: Optional[int] = None, + topology_manager_policy: Optional[str] = None, + allowed_unsafe_sysctls: Optional[List[str]] = None, + fail_swap_on: Optional[bool] = None, + container_log_max_size_mb: Optional[int] = None, + container_log_max_files: Optional[int] = None, + pod_max_pids: Optional[int] = None, + **kwargs + ): super(KubeletConfig, self).__init__(**kwargs) self.cpu_manager_policy = cpu_manager_policy self.cpu_cfs_quota = cpu_cfs_quota @@ -968,20 +1309,17 @@ def __init__(self, *, cpu_manager_policy: str=None, cpu_cfs_quota: bool=None, cp self.pod_max_pids = pod_max_pids -class LinuxOSConfig(Model): +class LinuxOSConfig(msrest.serialization.Model): """OS configurations of Linux agent nodes. :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2020_12_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. + :type sysctls: ~azure.mgmt.containerservice.v2020_12_01.models.SysctlConfig + :param transparent_huge_page_enabled: Transparent Huge Page enabled configuration. :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. + :param transparent_huge_page_defrag: Transparent Huge Page defrag configuration. :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. + :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap file will be created on + each node. :type swap_file_size_mb: int """ @@ -992,7 +1330,15 @@ class LinuxOSConfig(Model): 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, } - def __init__(self, *, sysctls=None, transparent_huge_page_enabled: str=None, transparent_huge_page_defrag: str=None, swap_file_size_mb: int=None, **kwargs) -> None: + def __init__( + self, + *, + sysctls: Optional["SysctlConfig"] = None, + transparent_huge_page_enabled: Optional[str] = None, + transparent_huge_page_defrag: Optional[str] = None, + swap_file_size_mb: Optional[int] = None, + **kwargs + ): super(LinuxOSConfig, self).__init__(**kwargs) self.sysctls = sysctls self.transparent_huge_page_enabled = transparent_huge_page_enabled @@ -1003,25 +1349,21 @@ def __init__(self, *, sysctls=None, transparent_huge_page_enabled: str=None, tra class MaintenanceConfiguration(SubResource): """maintenance configuration. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2020_12_01.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2020_12_01.models.SystemData :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2020_12_01.models.TimeInWeek] + :type time_in_week: list[~azure.mgmt.containerservice.v2020_12_01.models.TimeInWeek] :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2020_12_01.models.TimeSpan] + :type not_allowed_time: list[~azure.mgmt.containerservice.v2020_12_01.models.TimeSpan] """ _validation = { @@ -1040,30 +1382,66 @@ class MaintenanceConfiguration(SubResource): 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, } - def __init__(self, *, time_in_week=None, not_allowed_time=None, **kwargs) -> None: + def __init__( + self, + *, + time_in_week: Optional[List["TimeInWeek"]] = None, + not_allowed_time: Optional[List["TimeSpan"]] = None, + **kwargs + ): super(MaintenanceConfiguration, self).__init__(**kwargs) self.system_data = None self.time_in_week = time_in_week self.not_allowed_time = not_allowed_time -class Resource(Model): +class MaintenanceConfigurationListResult(msrest.serialization.Model): + """The response from the List maintenance configurations operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of maintenance configurations. + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration] + :ivar next_link: The URL to get the next set of maintenance configuration results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MaintenanceConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["MaintenanceConfiguration"]] = None, + **kwargs + ): + super(MaintenanceConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class Resource(msrest.serialization.Model): """The Resource model definition. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -1082,7 +1460,13 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, location: str, tags=None, **kwargs) -> None: + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -1091,35 +1475,23 @@ def __init__(self, *, location: str, tags=None, **kwargs) -> None: self.tags = tags -class ManagedCluster(Resource): +class ManagedCluster(Resource, Components1Q1Og48SchemasManagedclusterAllof1): """Managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. :type kubernetes_version: str :param dns_prefix: DNS prefix specified when creating the managed cluster. :type dns_prefix: str @@ -1130,16 +1502,14 @@ class ManagedCluster(Resource): :param agent_pool_profiles: Properties of the agent pool. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. + :param linux_profile: Profile for Linux VMs in the container service cluster. :type linux_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. + :param windows_profile: Profile for Windows VMs in the container service cluster. :type windows_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. :type service_principal_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterServicePrincipalProfile :param addon_profiles: Profile of managed cluster add-on. @@ -1148,65 +1518,62 @@ class ManagedCluster(Resource): :param pod_identity_profile: Profile of managed cluster pod identity. :type pod_identity_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. + :param node_resource_group: Name of the resource group containing agent pool nodes. :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. :type enable_pod_security_policy: bool :param network_profile: Profile of network configuration. :type network_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceNetworkProfile :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile + :type aad_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile :param auto_upgrade_profile: Profile of auto upgrade configuration. :type auto_upgrade_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. :type auto_scaler_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. + :param api_server_access_profile: Access profile for managed cluster API server. :type api_server_access_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. :type disk_encryption_set_id: str :param identity_profile: Identities associated with the cluster. :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentity + ~azure.mgmt.containerservice.v2020_12_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKU + :type sku: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKU """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, 'max_agent_pools': {'readonly': True}, 'fqdn': {'readonly': True}, 'private_fqdn': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, @@ -1229,13 +1596,44 @@ class ManagedCluster(Resource): 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, } - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, pod_identity_profile=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_upgrade_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) + def __init__( + self, + *, + location: str, + identity: Optional["ManagedClusterIdentity"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + agent_pool_profiles: Optional[List["ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "ManagedClusterAddonProfile"]] = None, + pod_identity_profile: Optional["ManagedClusterPodIdentityProfile"] = None, + node_resource_group: Optional[str] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + network_profile: Optional["ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["ManagedClusterAADProfile"] = None, + auto_upgrade_profile: Optional["ManagedClusterAutoUpgradeProfile"] = None, + auto_scaler_profile: Optional["ManagedClusterPropertiesAutoScalerProfile"] = None, + api_server_access_profile: Optional["ManagedClusterAPIServerAccessProfile"] = None, + disk_encryption_set_id: Optional[str] = None, + identity_profile: Optional[Dict[str, "ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties"]] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["ManagedClusterSKU"] = None, + **kwargs + ): + super(ManagedCluster, self).__init__(location=location, tags=tags, identity=identity, kubernetes_version=kubernetes_version, dns_prefix=dns_prefix, agent_pool_profiles=agent_pool_profiles, linux_profile=linux_profile, windows_profile=windows_profile, service_principal_profile=service_principal_profile, addon_profiles=addon_profiles, pod_identity_profile=pod_identity_profile, node_resource_group=node_resource_group, enable_rbac=enable_rbac, enable_pod_security_policy=enable_pod_security_policy, network_profile=network_profile, aad_profile=aad_profile, auto_upgrade_profile=auto_upgrade_profile, auto_scaler_profile=auto_scaler_profile, api_server_access_profile=api_server_access_profile, disk_encryption_set_id=disk_encryption_set_id, identity_profile=identity_profile, **kwargs) + self.identity = identity self.provisioning_state = None self.power_state = None self.max_agent_pools = None @@ -1259,47 +1657,61 @@ def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dn self.api_server_access_profile = api_server_access_profile self.disk_encryption_set_id = disk_encryption_set_id self.identity_profile = identity_profile - self.identity = identity + self.sku = sku + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags self.sku = sku -class ManagedClusterAADProfile(Model): +class ManagedClusterAADProfile(msrest.serialization.Model): """AADProfile specifies attributes for Azure Active Directory integration. :param managed: Whether to enable managed AAD. :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. + :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] + :param admin_group_object_i_ds: AAD group object IDs that will have admin role of the cluster. + :type admin_group_object_i_ds: list[str] :param client_app_id: The client AAD application ID. :type client_app_id: str :param server_app_id: The server AAD application ID. :type server_app_id: str :param server_app_secret: The server AAD application secret. :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. :type tenant_id: str """ _attribute_map = { 'managed': {'key': 'managed', 'type': 'bool'}, 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, + 'admin_group_object_i_ds': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, 'tenant_id': {'key': 'tenantID', 'type': 'str'}, } - def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: + def __init__( + self, + *, + managed: Optional[bool] = None, + enable_azure_rbac: Optional[bool] = None, + admin_group_object_i_ds: Optional[List[str]] = None, + client_app_id: Optional[str] = None, + server_app_id: Optional[str] = None, + server_app_secret: Optional[str] = None, + tenant_id: Optional[str] = None, + **kwargs + ): super(ManagedClusterAADProfile, self).__init__(**kwargs) self.managed = managed self.enable_azure_rbac = enable_azure_rbac - self.admin_group_object_ids = admin_group_object_ids + self.admin_group_object_i_ds = admin_group_object_i_ds self.client_app_id = client_app_id self.server_app_id = server_app_id self.server_app_secret = server_app_secret @@ -1309,20 +1721,19 @@ def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_gr class ManagedClusterAccessProfile(Resource): """Managed cluster Access Profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param kube_config: Base64-encoded Kubernetes configuration file. :type kube_config: bytearray @@ -1344,16 +1755,22 @@ class ManagedClusterAccessProfile(Resource): 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, } - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytearray] = None, + **kwargs + ): super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) self.kube_config = kube_config -class ManagedClusterAddonProfile(Model): +class ManagedClusterAddonProfile(msrest.serialization.Model): """A Kubernetes add-on profile for a managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -1377,37 +1794,19 @@ class ManagedClusterAddonProfile(Model): 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, } - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: + def __init__( + self, + *, + enabled: bool, + config: Optional[Dict[str, str]] = None, + **kwargs + ): super(ManagedClusterAddonProfile, self).__init__(**kwargs) self.enabled = enabled self.config = config self.identity = None -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): """Information of user assigned identity used by this add-on. @@ -1425,176 +1824,154 @@ class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): 'object_id': {'key': 'objectId', 'type': 'str'}, } - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) -class ManagedClusterAgentPoolProfileProperties(Model): +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): """Properties for the container service agent pool profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool """ _validation = { + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1634,7 +2011,39 @@ class ManagedClusterAgentPoolProfileProperties(Model): 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, } - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, **kwargs) -> None: + def __init__( + self, + *, + count: Optional[int] = None, + vm_size: Optional[Union[str, "ContainerServiceVMSizeTypes"]] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + **kwargs + ): super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) self.count = count self.vm_size = vm_size @@ -1672,174 +2081,145 @@ def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): """Profile for the container service agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. :type name: str """ _validation = { + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1881,19 +2261,50 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, *, name: str, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, **kwargs) -> None: + def __init__( + self, + *, + name: str, + count: Optional[int] = None, + vm_size: Optional[Union[str, "ContainerServiceVMSizeTypes"]] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + **kwargs + ): super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, os_disk_type=os_disk_type, kubelet_disk_type=kubelet_disk_type, vnet_subnet_id=vnet_subnet_id, pod_subnet_id=pod_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, kubelet_config=kubelet_config, linux_os_config=linux_os_config, enable_encryption_at_host=enable_encryption_at_host, **kwargs) self.name = name -class ManagedClusterAPIServerAccessProfile(Model): +class ManagedClusterAPIServerAccessProfile(msrest.serialization.Model): """Access profile for managed cluster API server. - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. + :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. + :param enable_private_cluster: Whether to create the cluster as a private cluster or not. :type enable_private_cluster: bool :param private_dns_zone: Private dns zone mode for private cluster. :type private_dns_zone: str @@ -1905,58 +2316,65 @@ class ManagedClusterAPIServerAccessProfile(Model): 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, } - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, private_dns_zone: str=None, **kwargs) -> None: + def __init__( + self, + *, + authorized_ip_ranges: Optional[List[str]] = None, + enable_private_cluster: Optional[bool] = None, + private_dns_zone: Optional[str] = None, + **kwargs + ): super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) self.authorized_ip_ranges = authorized_ip_ranges self.enable_private_cluster = enable_private_cluster self.private_dns_zone = private_dns_zone -class ManagedClusterAutoUpgradeProfile(Model): +class ManagedClusterAutoUpgradeProfile(msrest.serialization.Model): """Auto upgrade profile for a managed cluster. - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2020_12_01.models.UpgradeChannel + :param upgrade_channel: upgrade channel for auto upgrade. Possible values include: "rapid", + "stable", "patch", "none". + :type upgrade_channel: str or ~azure.mgmt.containerservice.v2020_12_01.models.UpgradeChannel """ _attribute_map = { 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, } - def __init__(self, *, upgrade_channel=None, **kwargs) -> None: + def __init__( + self, + *, + upgrade_channel: Optional[Union[str, "UpgradeChannel"]] = None, + **kwargs + ): super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) self.upgrade_channel = upgrade_channel -class ManagedClusterIdentity(Model): +class ManagedClusterIdentity(msrest.serialization.Model): """Identity for the managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: + :param type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use + an implicitly created identity in master components and an auto-created user assigned identity + in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, + service principal will be used instead. Possible values include: "SystemAssigned", + "UserAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2020_12_01.models.ResourceIdentityType + :param user_assigned_identities: The user identity associated with the managed cluster. This + identity will be used in control plane and only one user assigned identity is allowed. The user + identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] + ~azure.mgmt.containerservice.v2020_12_01.models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties] """ _validation = { @@ -1967,11 +2385,17 @@ class ManagedClusterIdentity(Model): _attribute_map = { 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties}'}, } - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + user_assigned_identities: Optional[Dict[str, "Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None, + **kwargs + ): super(ManagedClusterIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None @@ -1979,61 +2403,60 @@ def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> Non self.user_assigned_identities = user_assigned_identities -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str """ _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, + 'next_link': {'readonly': True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None + def __init__( + self, + *, + value: Optional[List["ManagedCluster"]] = None, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None -class ManagedClusterLoadBalancerProfile(Model): +class ManagedClusterLoadBalancerProfile(msrest.serialization.Model): """Profile of the managed cluster load balancer. - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: + :param managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :type managed_outbound_i_ps: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. + :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load + balancer. :type outbound_ip_prefixes: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: + :param outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :type outbound_i_ps: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: + :param effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :type effective_outbound_i_ps: list[~azure.mgmt.containerservice.v2020_12_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . + :param allocated_outbound_ports: Desired number of allocated SNAT ports per VM. Allowed values + must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure + dynamically allocating ports. :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . + :param idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. :type idle_timeout_in_minutes: int """ @@ -2043,30 +2466,39 @@ class ManagedClusterLoadBalancerProfile(Model): } _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, + 'managed_outbound_i_ps': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, + 'outbound_i_ps': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, + 'effective_outbound_i_ps': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, } - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: + def __init__( + self, + *, + managed_outbound_i_ps: Optional["ManagedClusterLoadBalancerProfileManagedOutboundIPs"] = None, + outbound_ip_prefixes: Optional["ManagedClusterLoadBalancerProfileOutboundIPPrefixes"] = None, + outbound_i_ps: Optional["ManagedClusterLoadBalancerProfileOutboundIPs"] = None, + effective_outbound_i_ps: Optional[List["ResourceReference"]] = None, + allocated_outbound_ports: Optional[int] = 0, + idle_timeout_in_minutes: Optional[int] = 30, + **kwargs + ): super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips + self.managed_outbound_i_ps = managed_outbound_i_ps self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips + self.outbound_i_ps = outbound_i_ps + self.effective_outbound_i_ps = effective_outbound_i_ps self.allocated_outbound_ports = allocated_outbound_ports self.idle_timeout_in_minutes = idle_timeout_in_minutes -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileManagedOutboundIPs(msrest.serialization.Model): """Desired managed outbound IPs for the cluster load balancer. - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . + :param count: Desired number of outbound IP created/managed by Azure for the cluster load + balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. :type count: int """ @@ -2078,12 +2510,17 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): 'count': {'key': 'count', 'type': 'int'}, } - def __init__(self, *, count: int=1, **kwargs) -> None: + def __init__( + self, + *, + count: Optional[int] = 1, + **kwargs + ): super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) self.count = count -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): +class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(msrest.serialization.Model): """Desired outbound IP Prefix resources for the cluster load balancer. :param public_ip_prefixes: A list of public IP prefix resources. @@ -2095,33 +2532,41 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, } - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: + def __init__( + self, + *, + public_ip_prefixes: Optional[List["ResourceReference"]] = None, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) self.public_ip_prefixes = public_ip_prefixes -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileOutboundIPs(msrest.serialization.Model): """Desired outbound IP resources for the cluster load balancer. - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_12_01.models.ResourceReference] + :param public_i_ps: A list of public IP resources. + :type public_i_ps: list[~azure.mgmt.containerservice.v2020_12_01.models.ResourceReference] """ _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, + 'public_i_ps': {'key': 'publicIPs', 'type': '[ResourceReference]'}, } - def __init__(self, *, public_ips=None, **kwargs) -> None: + def __init__( + self, + *, + public_i_ps: Optional[List["ResourceReference"]] = None, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips + self.public_i_ps = public_i_ps -class ManagedClusterPodIdentity(Model): +class ManagedClusterPodIdentity(msrest.serialization.Model): """ManagedClusterPodIdentity. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2130,11 +2575,9 @@ class ManagedClusterPodIdentity(Model): :param namespace: Required. Namespace of the pod identity. :type namespace: str :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2020_12_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' + :type identity: ~azure.mgmt.containerservice.v2020_12_01.models.UserAssignedIdentity + :ivar provisioning_state: The current provisioning state of the pod identity. Possible values + include: "Assigned", "Updating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityProvisioningState :ivar provisioning_info: @@ -2158,7 +2601,14 @@ class ManagedClusterPodIdentity(Model): 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, } - def __init__(self, *, name: str, namespace: str, identity, **kwargs) -> None: + def __init__( + self, + *, + name: str, + namespace: str, + identity: "UserAssignedIdentity", + **kwargs + ): super(ManagedClusterPodIdentity, self).__init__(**kwargs) self.name = name self.namespace = namespace @@ -2167,7 +2617,7 @@ def __init__(self, *, name: str, namespace: str, identity, **kwargs) -> None: self.provisioning_info = None -class ManagedClusterPodIdentityException(Model): +class ManagedClusterPodIdentityException(msrest.serialization.Model): """ManagedClusterPodIdentityException. All required parameters must be populated in order to send to Azure. @@ -2192,14 +2642,21 @@ class ManagedClusterPodIdentityException(Model): 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, } - def __init__(self, *, name: str, namespace: str, pod_labels, **kwargs) -> None: + def __init__( + self, + *, + name: str, + namespace: str, + pod_labels: Dict[str, str], + **kwargs + ): super(ManagedClusterPodIdentityException, self).__init__(**kwargs) self.name = name self.namespace = namespace self.pod_labels = pod_labels -class ManagedClusterPodIdentityProfile(Model): +class ManagedClusterPodIdentityProfile(msrest.serialization.Model): """ManagedClusterPodIdentityProfile. :param enabled: Whether the pod identity addon is enabled. @@ -2207,8 +2664,7 @@ class ManagedClusterPodIdentityProfile(Model): :param user_assigned_identities: User assigned pod identity settings. :type user_assigned_identities: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. + :param user_assigned_identity_exceptions: User assigned pod identity exception settings. :type user_assigned_identity_exceptions: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityException] """ @@ -2219,14 +2675,21 @@ class ManagedClusterPodIdentityProfile(Model): 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, } - def __init__(self, *, enabled: bool=None, user_assigned_identities=None, user_assigned_identity_exceptions=None, **kwargs) -> None: + def __init__( + self, + *, + enabled: Optional[bool] = None, + user_assigned_identities: Optional[List["ManagedClusterPodIdentity"]] = None, + user_assigned_identity_exceptions: Optional[List["ManagedClusterPodIdentityException"]] = None, + **kwargs + ): super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) self.enabled = enabled self.user_assigned_identities = user_assigned_identities self.user_assigned_identity_exceptions = user_assigned_identity_exceptions -class ManagedClusterPodIdentityProvisioningInfo(Model): +class ManagedClusterPodIdentityProvisioningInfo(msrest.serialization.Model): """ManagedClusterPodIdentityProvisioningInfo. :param error: Pod identity assignment error (if any). @@ -2237,28 +2700,29 @@ class ManagedClusterPodIdentityProvisioningInfo(Model): 'error': {'key': 'error', 'type': 'CloudError'}, } - def __init__(self, *, error=None, **kwargs) -> None: + def __init__( + self, + *, + error: Optional["CloudError"] = None, + **kwargs + ): super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) self.error = error -class ManagedClusterPoolUpgradeProfile(Model): +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrade versions. All required parameters must be populated in order to send to Azure. - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str :param name: Pool name. :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] """ @@ -2275,7 +2739,15 @@ class ManagedClusterPoolUpgradeProfile(Model): 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, } - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "OSType"] = "Linux", + name: Optional[str] = None, + upgrades: Optional[List["ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, + **kwargs + ): super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) self.kubernetes_version = kubernetes_version self.name = name @@ -2283,7 +2755,7 @@ def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", self.upgrades = upgrades -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): """ManagedClusterPoolUpgradeProfileUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -2297,21 +2769,25 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kubernetes_version self.is_preview = is_preview -class ManagedClusterPropertiesAutoScalerProfile(Model): +class ManagedClusterPropertiesAutoScalerProfile(msrest.serialization.Model): """Parameters to be applied to the cluster-autoscaler when enabled. :param balance_similar_node_groups: :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2020_12_01.models.Expander + :param expander: Possible values include: "least-waste", "most-pods", "priority", "random". + :type expander: str or ~azure.mgmt.containerservice.v2020_12_01.models.Expander :param max_empty_bulk_delete: :type max_empty_bulk_delete: str :param max_graceful_termination_sec: @@ -2364,7 +2840,28 @@ class ManagedClusterPropertiesAutoScalerProfile(Model): 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, } - def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_empty_bulk_delete: str=None, max_graceful_termination_sec: str=None, max_node_provision_time: str=None, max_total_unready_percentage: str=None, new_pod_scale_up_delay: str=None, ok_total_unready_count: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, skip_nodes_with_local_storage: str=None, skip_nodes_with_system_pods: str=None, **kwargs) -> None: + def __init__( + self, + *, + balance_similar_node_groups: Optional[str] = None, + expander: Optional[Union[str, "Expander"]] = None, + max_empty_bulk_delete: Optional[str] = None, + max_graceful_termination_sec: Optional[str] = None, + max_node_provision_time: Optional[str] = None, + max_total_unready_percentage: Optional[str] = None, + new_pod_scale_up_delay: Optional[str] = None, + ok_total_unready_count: Optional[str] = None, + scan_interval: Optional[str] = None, + scale_down_delay_after_add: Optional[str] = None, + scale_down_delay_after_delete: Optional[str] = None, + scale_down_delay_after_failure: Optional[str] = None, + scale_down_unneeded_time: Optional[str] = None, + scale_down_unready_time: Optional[str] = None, + scale_down_utilization_threshold: Optional[str] = None, + skip_nodes_with_local_storage: Optional[str] = None, + skip_nodes_with_system_pods: Optional[str] = None, + **kwargs + ): super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) self.balance_similar_node_groups = balance_similar_node_groups self.expander = expander @@ -2385,37 +2882,14 @@ def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_ self.skip_nodes_with_system_pods = skip_nodes_with_system_pods -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. All required parameters must be populated in order to send to Azure. :param client_id: Required. The ID for the service principal. :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. + :param secret: The secret password associated with the service principal in plain text. :type secret: str """ @@ -2428,23 +2902,25 @@ class ManagedClusterServicePrincipalProfile(Model): 'secret': {'key': 'secret', 'type': 'str'}, } - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: + def __init__( + self, + *, + client_id: str, + secret: Optional[str] = None, + **kwargs + ): super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) self.client_id = client_id self.secret = secret -class ManagedClusterSKU(Model): +class ManagedClusterSKU(msrest.serialization.Model): """ManagedClusterSKU. - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUTier + :param name: Name of a managed cluster SKU. Possible values include: "Basic". + :type name: str or ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUName + :param tier: Tier of a managed cluster SKU. Possible values include: "Paid", "Free". + :type tier: str or ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUTier """ _attribute_map = { @@ -2452,17 +2928,22 @@ class ManagedClusterSKU(Model): 'tier': {'key': 'tier', 'type': 'str'}, } - def __init__(self, *, name=None, tier=None, **kwargs) -> None: + def __init__( + self, + *, + name: Optional[Union[str, "ManagedClusterSKUName"]] = None, + tier: Optional[Union[str, "ManagedClusterSKUTier"]] = None, + **kwargs + ): super(ManagedClusterSKU, self).__init__(**kwargs) self.name = name self.tier = tier -class ManagedClusterUpgradeProfile(Model): +class ManagedClusterUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for compute pools. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2472,12 +2953,11 @@ class ManagedClusterUpgradeProfile(Model): :vartype name: str :ivar type: Type of upgrade profile. :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. :type control_plane_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPoolUpgradeProfile] """ @@ -2498,7 +2978,13 @@ class ManagedClusterUpgradeProfile(Model): 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, } - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: + def __init__( + self, + *, + control_plane_profile: "ManagedClusterPoolUpgradeProfile", + agent_pool_profiles: List["ManagedClusterPoolUpgradeProfile"], + **kwargs + ): super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None @@ -2507,34 +2993,30 @@ def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> N self.agent_pool_profiles = agent_pool_profiles -class ManagedClusterWindowsProfile(Model): +class ManagedClusterWindowsProfile(msrest.serialization.Model): """Profile for Windows VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.LicenseType + :param license_type: The licenseType to use for Windows VMs. Windows_Server is used to enable + Azure Hybrid User Benefits for Windows VMs. Possible values include: "None", "Windows_Server". + :type license_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.LicenseType """ _validation = { @@ -2547,18 +3029,49 @@ class ManagedClusterWindowsProfile(Model): 'license_type': {'key': 'licenseType', 'type': 'str'}, } - def __init__(self, *, admin_username: str, admin_password: str=None, license_type=None, **kwargs) -> None: + def __init__( + self, + *, + admin_username: str, + admin_password: Optional[str] = None, + license_type: Optional[Union[str, "LicenseType"]] = None, + **kwargs + ): super(ManagedClusterWindowsProfile, self).__init__(**kwargs) self.admin_username = admin_username self.admin_password = admin_password self.license_type = license_type -class OperationValue(Model): +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.containerservice.v2020_12_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): """Describes the properties of a Compute Operation value. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar origin: The origin of the compute operation. :vartype origin: str @@ -2592,7 +3105,10 @@ class OperationValue(Model): 'provider': {'key': 'display.provider', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(OperationValue, self).__init__(**kwargs) self.origin = None self.name = None @@ -2602,11 +3118,11 @@ def __init__(self, **kwargs) -> None: self.provider = None -class PowerState(Model): +class PowerState(msrest.serialization.Model): """Describes the Power State of the cluster. - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' + :param code: Tells whether the cluster is Running or Stopped. Possible values include: + "Running", "Stopped". :type code: str or ~azure.mgmt.containerservice.v2020_12_01.models.Code """ @@ -2614,15 +3130,20 @@ class PowerState(Model): 'code': {'key': 'code', 'type': 'str'}, } - def __init__(self, *, code=None, **kwargs) -> None: + def __init__( + self, + *, + code: Optional[Union[str, "Code"]] = None, + **kwargs + ): super(PowerState, self).__init__(**kwargs) self.code = code -class PrivateEndpoint(Model): +class PrivateEndpoint(msrest.serialization.Model): """Private endpoint which a connection belongs to. - :param id: The resource Id for private endpoint + :param id: The resource Id for private endpoint. :type id: str """ @@ -2630,18 +3151,20 @@ class PrivateEndpoint(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): super(PrivateEndpoint, self).__init__(**kwargs) self.id = id -class PrivateEndpointConnection(Model): +class PrivateEndpointConnection(msrest.serialization.Model): """A private endpoint connection. - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The ID of the private endpoint connection. :vartype id: str @@ -2649,16 +3172,14 @@ class PrivateEndpointConnection(Model): :vartype name: str :ivar type: The resource type. :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + :ivar provisioning_state: The current provisioning state. Possible values include: "Succeeded", + "Creating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnectionProvisioningState :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. + :type private_endpoint: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. :type private_link_service_connection_state: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkServiceConnectionState """ @@ -2668,7 +3189,6 @@ class PrivateEndpointConnection(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, } _attribute_map = { @@ -2680,7 +3200,13 @@ class PrivateEndpointConnection(Model): 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, } - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: + def __init__( + self, + *, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): super(PrivateEndpointConnection, self).__init__(**kwargs) self.id = None self.name = None @@ -2690,28 +3216,31 @@ def __init__(self, *, private_link_service_connection_state, private_endpoint=No self.private_link_service_connection_state = private_link_service_connection_state -class PrivateEndpointConnectionListResult(Model): +class PrivateEndpointConnectionListResult(msrest.serialization.Model): """A list of private endpoint connections. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection] + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, } - def __init__(self, *, value=None, **kwargs) -> None: + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + **kwargs + ): super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) self.value = value -class PrivateLinkResource(Model): +class PrivateLinkResource(msrest.serialization.Model): """A private link resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: The ID of the private link resource. :type id: str @@ -2721,10 +3250,10 @@ class PrivateLinkResource(Model): :type type: str :param group_id: The group ID of the resource. :type group_id: str - :param required_members: RequiredMembers of the resource + :param required_members: RequiredMembers of the resource. :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. + :ivar private_link_service_id: The private link service ID of the resource, this field is + exposed only to NRP internally. :vartype private_link_service_id: str """ @@ -2741,7 +3270,16 @@ class PrivateLinkResource(Model): 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, } - def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: str=None, required_members=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + group_id: Optional[str] = None, + required_members: Optional[List[str]] = None, + **kwargs + ): super(PrivateLinkResource, self).__init__(**kwargs) self.id = id self.name = name @@ -2751,30 +3289,33 @@ def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: st self.private_link_service_id = None -class PrivateLinkResourcesListResult(Model): +class PrivateLinkResourcesListResult(msrest.serialization.Model): """A list of private link resources. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource] + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, } - def __init__(self, *, value=None, **kwargs) -> None: + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + **kwargs + ): super(PrivateLinkResourcesListResult, self).__init__(**kwargs) self.value = value -class PrivateLinkServiceConnectionState(Model): +class PrivateLinkServiceConnectionState(msrest.serialization.Model): """The state of a private link service connection. - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ConnectionStatus + :param status: The private link service connection status. Possible values include: "Pending", + "Approved", "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.containerservice.v2020_12_01.models.ConnectionStatus :param description: The private link service connection description. :type description: str """ @@ -2784,13 +3325,19 @@ class PrivateLinkServiceConnectionState(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: + def __init__( + self, + *, + status: Optional[Union[str, "ConnectionStatus"]] = None, + description: Optional[str] = None, + **kwargs + ): super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) self.status = status self.description = description -class ResourceReference(Model): +class ResourceReference(msrest.serialization.Model): """A reference to an Azure resource. :param id: The fully qualified Azure resource id. @@ -2801,18 +3348,22 @@ class ResourceReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): super(ResourceReference, self).__init__(**kwargs) self.id = id -class SysctlConfig(Model): +class SysctlConfig(msrest.serialization.Model): """Sysctl settings for Linux agent nodes. :param net_core_somaxconn: Sysctl setting net.core.somaxconn. :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. + :param net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. :type net_core_netdev_max_backlog: int :param net_core_rmem_default: Sysctl setting net.core.rmem_default. :type net_core_rmem_default: int @@ -2824,45 +3375,33 @@ class SysctlConfig(Model): :type net_core_wmem_max: int :param net_core_optmem_max: Sysctl setting net.core.optmem_max. :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. + :param net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. + :param net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. :type net_ipv4_tcp_max_tw_buckets: int :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. + :param net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. + :param net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. + :param net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. :type net_ipv4_tcpkeepalive_intvl: int :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. + :param net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. + :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. + :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. + :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. + :param net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. + :param net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. + :param fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. :type fs_inotify_max_user_watches: int :param fs_file_max: Sysctl setting fs.file-max. :type fs_file_max: int @@ -2911,7 +3450,39 @@ class SysctlConfig(Model): 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, } - def __init__(self, *, net_core_somaxconn: int=None, net_core_netdev_max_backlog: int=None, net_core_rmem_default: int=None, net_core_rmem_max: int=None, net_core_wmem_default: int=None, net_core_wmem_max: int=None, net_core_optmem_max: int=None, net_ipv4_tcp_max_syn_backlog: int=None, net_ipv4_tcp_max_tw_buckets: int=None, net_ipv4_tcp_fin_timeout: int=None, net_ipv4_tcp_keepalive_time: int=None, net_ipv4_tcp_keepalive_probes: int=None, net_ipv4_tcpkeepalive_intvl: int=None, net_ipv4_tcp_tw_reuse: bool=None, net_ipv4_ip_local_port_range: str=None, net_ipv4_neigh_default_gc_thresh1: int=None, net_ipv4_neigh_default_gc_thresh2: int=None, net_ipv4_neigh_default_gc_thresh3: int=None, net_netfilter_nf_conntrack_max: int=None, net_netfilter_nf_conntrack_buckets: int=None, fs_inotify_max_user_watches: int=None, fs_file_max: int=None, fs_aio_max_nr: int=None, fs_nr_open: int=None, kernel_threads_max: int=None, vm_max_map_count: int=None, vm_swappiness: int=None, vm_vfs_cache_pressure: int=None, **kwargs) -> None: + def __init__( + self, + *, + net_core_somaxconn: Optional[int] = None, + net_core_netdev_max_backlog: Optional[int] = None, + net_core_rmem_default: Optional[int] = None, + net_core_rmem_max: Optional[int] = None, + net_core_wmem_default: Optional[int] = None, + net_core_wmem_max: Optional[int] = None, + net_core_optmem_max: Optional[int] = None, + net_ipv4_tcp_max_syn_backlog: Optional[int] = None, + net_ipv4_tcp_max_tw_buckets: Optional[int] = None, + net_ipv4_tcp_fin_timeout: Optional[int] = None, + net_ipv4_tcp_keepalive_time: Optional[int] = None, + net_ipv4_tcp_keepalive_probes: Optional[int] = None, + net_ipv4_tcpkeepalive_intvl: Optional[int] = None, + net_ipv4_tcp_tw_reuse: Optional[bool] = None, + net_ipv4_ip_local_port_range: Optional[str] = None, + net_ipv4_neigh_default_gc_thresh1: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh2: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh3: Optional[int] = None, + net_netfilter_nf_conntrack_max: Optional[int] = None, + net_netfilter_nf_conntrack_buckets: Optional[int] = None, + fs_inotify_max_user_watches: Optional[int] = None, + fs_file_max: Optional[int] = None, + fs_aio_max_nr: Optional[int] = None, + fs_nr_open: Optional[int] = None, + kernel_threads_max: Optional[int] = None, + vm_max_map_count: Optional[int] = None, + vm_swappiness: Optional[int] = None, + vm_vfs_cache_pressure: Optional[int] = None, + **kwargs + ): super(SysctlConfig, self).__init__(**kwargs) self.net_core_somaxconn = net_core_somaxconn self.net_core_netdev_max_backlog = net_core_netdev_max_backlog @@ -2943,27 +3514,24 @@ def __init__(self, *, net_core_somaxconn: int=None, net_core_netdev_max_backlog: self.vm_vfs_cache_pressure = vm_vfs_cache_pressure -class SystemData(Model): +class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. :param created_by: The identity that created the resource. :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.CreatedByType + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.CreatedByType :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime + :type created_at: ~datetime.datetime :param last_modified_by: The identity that last modified the resource. :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". :type last_modified_by_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: datetime + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime """ _attribute_map = { @@ -2975,7 +3543,17 @@ class SystemData(Model): 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, } - def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): super(SystemData, self).__init__(**kwargs) self.created_by = created_by self.created_by_type = created_by_type @@ -2985,10 +3563,10 @@ def __init__(self, *, created_by: str=None, created_by_type=None, created_at=Non self.last_modified_at = last_modified_at -class TagsObject(Model): +class TagsObject(msrest.serialization.Model): """Tags object for patch operations. - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -2996,16 +3574,21 @@ class TagsObject(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, tags=None, **kwargs) -> None: + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): super(TagsObject, self).__init__(**kwargs) self.tags = tags -class TimeInWeek(Model): +class TimeInWeek(msrest.serialization.Model): """Time in a week. - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + :param day: A day in a week. Possible values include: "Sunday", "Monday", "Tuesday", + "Wednesday", "Thursday", "Friday", "Saturday". :type day: str or ~azure.mgmt.containerservice.v2020_12_01.models.WeekDay :param hour_slots: hour slots in a day. :type hour_slots: list[int] @@ -3016,19 +3599,25 @@ class TimeInWeek(Model): 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, } - def __init__(self, *, day=None, hour_slots=None, **kwargs) -> None: + def __init__( + self, + *, + day: Optional[Union[str, "WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs + ): super(TimeInWeek, self).__init__(**kwargs) self.day = day self.hour_slots = hour_slots -class TimeSpan(Model): +class TimeSpan(msrest.serialization.Model): """The time span with start and end properties. - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime + :param start: The start of a time span. + :type start: ~datetime.datetime + :param end: The end of a time span. + :type end: ~datetime.datetime """ _attribute_map = { @@ -3036,7 +3625,13 @@ class TimeSpan(Model): 'end': {'key': 'end', 'type': 'iso-8601'}, } - def __init__(self, *, start=None, end=None, **kwargs) -> None: + def __init__( + self, + *, + start: Optional[datetime.datetime] = None, + end: Optional[datetime.datetime] = None, + **kwargs + ): super(TimeSpan, self).__init__(**kwargs) self.start = start self.end = end diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_paged_models.py deleted file mode 100644 index 1abf8f1b7a5..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_paged_models.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class MaintenanceConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`MaintenanceConfiguration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MaintenanceConfiguration]'} - } - - def __init__(self, *args, **kwargs): - - super(MaintenanceConfigurationPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/__init__.py old mode 100644 new mode 100755 index d7bfa3f00fe..3942e0ca6a0 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/__init__.py @@ -1,12 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._operations import Operations diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_agent_pools_operations.py old mode 100644 new mode 100755 index 82e2b27e7ae..d5e36d9ff13 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_agent_pools_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_agent_pools_operations.py @@ -1,127 +1,141 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class AgentPoolsOperations(object): """AgentPoolsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-12-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config + self._config = config def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AgentPoolListResult"] """Gets a list of agent pools in the specified managed cluster. - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. + Gets a list of agent pools in the specified managed cluster. The operation returns properties + of each agent pool. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPool" """Gets the agent pool. - Gets the details of the agent pool by managed cluster and resource - group. + Gets the details of the agent pool by managed cluster and resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -129,115 +143,122 @@ def get( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPool + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPool" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.create_or_update.metadata['url'] + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AgentPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) + if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AgentPool"] """Creates or updates an agent pool. Creates or updates an agent pool in the specified managed cluster. @@ -248,92 +269,121 @@ def create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Create or Update an agent pool operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes an agent pool. Deletes the agent pool in the specified managed cluster. @@ -344,46 +394,72 @@ def delete( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPoolUpgradeProfile" """Gets upgrade profile for an agent pool. - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. + Gets the details of the upgrade profile for an agent pool with a specified resource group and + managed cluster name. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -391,63 +467,60 @@ def get_upgrade_profile( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get_upgrade_profile.metadata['url'] + url = self.get_upgrade_profile.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) + deserialized = self._deserialize('AgentPoolUpgradeProfile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} # type: ignore def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPoolAvailableVersions" """Gets a list of supported versions for the specified agent pool. Gets a list of supported versions for the specified agent pool. @@ -456,109 +529,112 @@ def get_available_agent_pool_versions( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolAvailableVersions, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolAvailableVersions + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolAvailableVersions"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] + url = self.get_available_agent_pool_versions.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) + deserialized = self._deserialize('AgentPoolAvailableVersions', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} - + get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} # type: ignore def _upgrade_node_image_version_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.AgentPool"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AgentPool"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.upgrade_node_image_version.metadata['url'] + url = self._upgrade_node_image_version_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None - if response.status_code == 202: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def upgrade_node_image_version( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + _upgrade_node_image_version_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore + + def begin_upgrade_node_image_version( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AgentPool"] """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. @@ -569,42 +645,59 @@ def upgrade_node_image_version( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._upgrade_node_image_version_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_maintenance_configurations_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_maintenance_configurations_operations.py old mode 100644 new mode 100755 index 3a73520450d..0d7f59ca557 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_maintenance_configurations_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_maintenance_configurations_operations.py @@ -1,129 +1,139 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class MaintenanceConfigurationsOperations(object): """MaintenanceConfigurationsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-12-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config + self._config = config def list_by_managed_cluster( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of maintenance configurations in the specified managed - cluster. + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.MaintenanceConfigurationListResult"] + """Gets a list of maintenance configurations in the specified managed cluster. - Gets a list of maintenance configurations in the specified managed - cluster. The operation returns properties of each maintenance - configuration. + Gets a list of maintenance configurations in the specified managed cluster. The operation + returns properties of each maintenance configuration. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of MaintenanceConfiguration - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfigurationPaged[~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MaintenanceConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_managed_cluster.metadata['url'] + url = self.list_by_managed_cluster.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('MaintenanceConfigurationListResult', 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) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.MaintenanceConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} + return ItemPaged( + get_next, extract_data + ) + list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} # type: ignore def get( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MaintenanceConfiguration" """Gets the maintenance configuration. - Gets the details of maintenance configurations by managed cluster and - resource group. + Gets the details of maintenance configurations by managed cluster and resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -131,120 +141,138 @@ def get( :type resource_name: str :param config_name: The name of the maintenance configuration. :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MaintenanceConfiguration or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') + 'configName': self._serialize.url("config_name", config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + def create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + parameters, # type: "_models.MaintenanceConfiguration" + **kwargs # type: Any + ): + # type: (...) -> "_models.MaintenanceConfiguration" + """Creates or updates a maintenance configurations. - def _create_or_update_initial( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, **operation_config): - parameters = models.MaintenanceConfiguration(time_in_week=time_in_week, not_allowed_time=not_allowed_time) + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :param parameters: Parameters supplied to the Create or Update a default maintenance + configuration. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') + 'configName': self._serialize.url("config_name", config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore - def create_or_update( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a maintenance configurations. + def delete( + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a maintenance configuration. - Creates or updates a maintenance configuration in the specified managed - cluster. + Deletes the maintenance configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -252,136 +280,46 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. :type config_name: str - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2020_12_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2020_12_01.models.TimeSpan] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - MaintenanceConfiguration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - time_in_week=time_in_week, - not_allowed_time=not_allowed_time, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} - + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" - def _delete_initial( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') + 'configName': self._serialize.url("config_name", config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a maintenance configuration. - - Deletes the maintenance configuration in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_managed_clusters_operations.py old mode 100644 new mode 100755 index d8060fe2f32..e424b772204 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_managed_clusters_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_managed_clusters_operations.py @@ -1,747 +1,768 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class ManagedClustersOperations(object): """ManagedClustersOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-12-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config + self._config = config def list( - self, custom_headers=None, raw=False, **operation_config): + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] """Gets a list of managed clusters in the specified subscription. - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] - :raises: :class:`CloudError` + Gets a list of managed clusters in the specified subscription. The operation returns properties + of each managed cluster. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] + """Lists managed clusters in the specified subscription and resource group. - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. + Lists managed clusters in the specified subscription and resource group. The operation returns + properties of each managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - return response + return pipeline_response - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterUpgradeProfile" """Gets upgrade profile for a managed cluster. - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. + Gets the details of the upgrade profile for a managed cluster with a specified resource group + and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get_upgrade_profile.metadata['url'] + url = self.get_upgrade_profile.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + role_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterAccessProfile" """Gets an access profile of a managed cluster. - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . + Gets the accessProfile for the specified role name of the managed cluster with a specified + resource group and name. **WARNING**\ : This API will be deprecated. Instead use + `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. + :param role_name: The name of the role for managed cluster accessProfile resource. :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get_access_profile.metadata['url'] + url = self.get_access_profile.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') + 'roleName': self._serialize.url("role_name", role_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" """Gets cluster admin credential of a managed cluster. - Gets cluster admin credential of the managed cluster with a specified - resource group and name. + Gets cluster admin credential of the managed cluster with a specified resource group and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + deserialized = self._deserialize('CredentialResults', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" """Gets cluster user credential of a managed cluster. - Gets cluster user credential of the managed cluster with a specified - resource group and name. + Gets cluster user credential of the managed cluster with a specified resource group and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + deserialized = self._deserialize('CredentialResults', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" """Gets cluster monitoring user credential of a managed cluster. - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. + Gets cluster monitoring user credential of the managed cluster with a specified resource group + and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] + url = self.list_cluster_monitoring_user_credentials.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + deserialized = self._deserialize('CredentialResults', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} + list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} # type: ignore def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" """Gets a managed cluster. - Gets the details of the managed cluster with a specified resource group - and name. + Gets the details of the managed cluster with a specified resource group and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster, or the result of cls(response) :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.create_or_update.metadata['url'] + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) + if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedCluster"] """Creates or updates a managed cluster. - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. + Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + version. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.update_tags.metadata['url'] + url = self._update_tags_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_update_tags( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedCluster"] """Updates tags on a managed cluster. Updates a managed cluster with the specified tags. @@ -750,88 +771,116 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes a managed cluster. Deletes the managed cluster with a specified resource group and name. @@ -840,85 +889,117 @@ def delete( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.reset_service_principal_profile.metadata['url'] + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + def begin_reset_service_principal_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Reset Service Principal Profile of a managed cluster. Update the service principal Profile for a managed cluster. @@ -927,90 +1008,121 @@ def reset_service_principal_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a + Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterServicePrincipalProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_service_principal_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.reset_aad_profile.metadata['url'] + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + def begin_reset_aad_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Reset AAD Profile of a managed cluster. Update the AAD Profile for a managed cluster. @@ -1019,84 +1131,114 @@ def reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed + Cluster. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] + url = self._rotate_cluster_certificates_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + if cls: + return cls(pipeline_response, None, {}) - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + _rotate_cluster_certificates_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + def begin_rotate_cluster_certificates( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Rotate certificates of a managed cluster. Rotate certificates of a managed cluster. @@ -1105,79 +1247,110 @@ def rotate_cluster_certificates( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._rotate_cluster_certificates_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore def _stop_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.stop.metadata['url'] + url = self._stop_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore - def stop( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + def begin_stop( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Stop Managed Cluster. Stops a Running Managed Cluster. @@ -1186,79 +1359,110 @@ def stop( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore def _start_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.start.metadata['url'] + url = self._start_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore - def start( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + def begin_start( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Start Managed Cluster. Starts a Stopped Managed Cluster. @@ -1267,35 +1471,54 @@ def start( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_operations.py old mode 100644 new mode 100755 index b2d2fa8b264..d49593528c7 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_operations.py @@ -1,102 +1,109 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class Operations(object): """Operations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-12-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config + self._config = config def list( - self, custom_headers=None, raw=False, **operation_config): + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationListResult"] """Gets a list of compute operations. - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_12_01.models.OperationValue] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] - + url = self.list.metadata['url'] # type: ignore # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_endpoint_connections_operations.py old mode 100644 new mode 100755 index 7399464c724..2fafddf9052 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_endpoint_connections_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_endpoint_connections_operations.py @@ -1,185 +1,187 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class PrivateEndpointConnectionsOperations(object): """PrivateEndpointConnectionsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-12-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config + self._config = config def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private endpoint connections in the specified managed - cluster. + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnectionListResult" + """Gets a list of private endpoint connections in the specified managed cluster. - Gets a list of private endpoint connections in the specified managed - cluster. The operation returns properties of each private endpoint - connection. + Gets a list of private endpoint connections in the specified managed cluster. The operation + returns properties of each private endpoint connection. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnectionListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnectionListResult + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionListResult', response) + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} # type: ignore def get( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" """Gets the private endpoint connection. - Gets the details of the private endpoint connection by managed cluster - and resource group. + Gets the details of the private endpoint connection by managed cluster and resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore def update( - self, resource_group_name, resource_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" """Updates a private endpoint connection. Updates a private endpoint connection in the specified managed cluster. @@ -188,161 +190,177 @@ def update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Update a private endpoint connection operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError """ - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.update.metadata['url'] + url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore def _delete_initial( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes a private endpoint connection. - Deletes the private endpoint connection in the specified managed - cluster. + Deletes the private endpoint connection in the specified managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_link_resources_operations.py old mode 100644 new mode 100755 index 90d19cc64af..e61301522a1 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_link_resources_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_link_resources_operations.py @@ -1,106 +1,107 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class PrivateLinkResourcesOperations(object): """PrivateLinkResourcesOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-12-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config + self._config = config def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourcesListResult" """Gets a list of private link resources in the specified managed cluster. - Gets a list of private link resources in the specified managed cluster. - The operation returns properties of each private link resource. + Gets a list of private link resources in the specified managed cluster. The operation returns + properties of each private link resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResourcesListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesListResult', response) + deserialized = self._deserialize('PrivateLinkResourcesListResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_resolve_private_link_service_id_operations.py old mode 100644 new mode 100755 index 04ef59705ae..c89c87d67a7 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_resolve_private_link_service_id_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_resolve_private_link_service_id_operations.py @@ -1,46 +1,57 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class ResolvePrivateLinkServiceIdOperations(object): """ResolvePrivateLinkServiceIdOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-12-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config + self._config = config def post( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.PrivateLinkResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResource" """Gets the private link service ID for the specified managed cluster. Gets the private link service ID the specified managed cluster. @@ -49,64 +60,56 @@ def post( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param parameters: Parameters (name, groupId) supplied in order to - resolve a private link service ID. - :type parameters: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :param parameters: Parameters (name, groupId) supplied in order to resolve a private link + service ID. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.post.metadata['url'] + url = self.post.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateLinkResource') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateLinkResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/version.py deleted file mode 100644 index 22afdcf8c3b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-12-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/_container_service_client.py deleted file mode 100644 index 7fed16ccf0e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/_container_service_client.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import MaintenanceConfigurationsOperations -from .operations import AgentPoolsOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ResolvePrivateLinkServiceIdOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2021_02_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2021_02_01.operations.ManagedClustersOperations - :ivar maintenance_configurations: MaintenanceConfigurations operations - :vartype maintenance_configurations: azure.mgmt.containerservice.v2021_02_01.operations.MaintenanceConfigurationsOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2021_02_01.operations.AgentPoolsOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations - :vartype private_endpoint_connections: azure.mgmt.containerservice.v2021_02_01.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations - :vartype private_link_resources: azure.mgmt.containerservice.v2021_02_01.operations.PrivateLinkResourcesOperations - :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceId operations - :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2021_02_01.operations.ResolvePrivateLinkServiceIdOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2021-02-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.maintenance_configurations = MaintenanceConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/__init__.py deleted file mode 100644 index 78c9a8ebc1e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/__init__.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import AgentPoolUpgradeSettings - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import KubeletConfig - from ._models_py3 import LinuxOSConfig - from ._models_py3 import MaintenanceConfiguration - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterAutoUpgradeProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPodIdentity - from ._models_py3 import ManagedClusterPodIdentityException - from ._models_py3 import ManagedClusterPodIdentityProfile - from ._models_py3 import ManagedClusterPodIdentityProvisioningInfo - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterSKU - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import PowerState - from ._models_py3 import PrivateEndpoint - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointConnectionListResult - from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkResourcesListResult - from ._models_py3 import PrivateLinkServiceConnectionState - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import RunCommandRequest - from ._models_py3 import RunCommandResult - from ._models_py3 import SubResource - from ._models_py3 import SysctlConfig - from ._models_py3 import SystemData - from ._models_py3 import TagsObject - from ._models_py3 import TimeInWeek - from ._models_py3 import TimeSpan - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import KubeletConfig - from ._models import LinuxOSConfig - from ._models import MaintenanceConfiguration - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterAutoUpgradeProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPodIdentity - from ._models import ManagedClusterPodIdentityException - from ._models import ManagedClusterPodIdentityProfile - from ._models import ManagedClusterPodIdentityProvisioningInfo - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import PowerState - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointConnectionListResult - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourcesListResult - from ._models import PrivateLinkServiceConnectionState - from ._models import Resource - from ._models import ResourceReference - from ._models import RunCommandRequest - from ._models import RunCommandResult - from ._models import SubResource - from ._models import SysctlConfig - from ._models import SystemData - from ._models import TagsObject - from ._models import TimeInWeek - from ._models import TimeSpan - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import MaintenanceConfigurationPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSDiskType, - KubeletDiskType, - OSType, - AgentPoolType, - AgentPoolMode, - Code, - ScaleSetPriority, - ScaleSetEvictionPolicy, - LicenseType, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - CreatedByType, - WeekDay, - ManagedClusterPodIdentityProvisioningState, - UpgradeChannel, - Expander, - ResourceIdentityType, - ManagedClusterSKUName, - ManagedClusterSKUTier, - PrivateEndpointConnectionProvisioningState, - ConnectionStatus, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'AgentPoolUpgradeSettings', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'KubeletConfig', - 'LinuxOSConfig', - 'MaintenanceConfiguration', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterAutoUpgradeProfile', - 'ManagedClusterIdentity', - 'ManagedClusterIdentityUserAssignedIdentitiesValue', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPodIdentity', - 'ManagedClusterPodIdentityException', - 'ManagedClusterPodIdentityProfile', - 'ManagedClusterPodIdentityProvisioningInfo', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterSKU', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'PowerState', - 'PrivateEndpoint', - 'PrivateEndpointConnection', - 'PrivateEndpointConnectionListResult', - 'PrivateLinkResource', - 'PrivateLinkResourcesListResult', - 'PrivateLinkServiceConnectionState', - 'Resource', - 'ResourceReference', - 'RunCommandRequest', - 'RunCommandResult', - 'SubResource', - 'SysctlConfig', - 'SystemData', - 'TagsObject', - 'TimeInWeek', - 'TimeSpan', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'MaintenanceConfigurationPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSDiskType', - 'KubeletDiskType', - 'OSType', - 'AgentPoolType', - 'AgentPoolMode', - 'Code', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'LicenseType', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'CreatedByType', - 'WeekDay', - 'ManagedClusterPodIdentityProvisioningState', - 'UpgradeChannel', - 'Expander', - 'ResourceIdentityType', - 'ManagedClusterSKUName', - 'ManagedClusterSKUTier', - 'PrivateEndpointConnectionProvisioningState', - 'ConnectionStatus', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_container_service_client_enums.py deleted file mode 100644 index 7c248fbbfd8..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,357 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSDiskType(str, Enum): - - managed = "Managed" - ephemeral = "Ephemeral" - - -class KubeletDiskType(str, Enum): - - os = "OS" - temporary = "Temporary" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class Code(str, Enum): - - running = "Running" - stopped = "Stopped" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class LicenseType(str, Enum): - - none = "None" - windows_server = "Windows_Server" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class CreatedByType(str, Enum): - - user = "User" - application = "Application" - managed_identity = "ManagedIdentity" - key = "Key" - - -class WeekDay(str, Enum): - - sunday = "Sunday" - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" - - -class ManagedClusterPodIdentityProvisioningState(str, Enum): - - assigned = "Assigned" - updating = "Updating" - deleting = "Deleting" - failed = "Failed" - - -class UpgradeChannel(str, Enum): - - rapid = "rapid" - stable = "stable" - patch = "patch" - none = "none" - - -class Expander(str, Enum): - - least_waste = "least-waste" - most_pods = "most-pods" - priority = "priority" - random = "random" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" - - -class PrivateEndpointConnectionProvisioningState(str, Enum): - - succeeded = "Succeeded" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_models.py deleted file mode 100644 index a2d7743e9ea..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_models.py +++ /dev/null @@ -1,3137 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_02_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'properties.kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'properties.nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'properties.enableEncryptionAtHost', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.kubelet_disk_type = kwargs.get('kubelet_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.pod_subnet_id = kwargs.get('pod_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.node_public_ip_prefix_id = kwargs.get('node_public_ip_prefix_id', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - self.kubelet_config = kwargs.get('kubelet_config', None) - self.linux_os_config = kwargs.get('linux_os_config', None) - self.enable_encryption_at_host = kwargs.get('enable_encryption_at_host', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - self.latest_node_image_version = kwargs.get('latest_node_image_version', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = kwargs.get('max_surge', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2021_02_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2021_02_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2021_02_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2021_02_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(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(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2021_02_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class KubeletConfig(Model): - """Kubelet configurations of agent nodes. - - :param cpu_manager_policy: CPU Manager policy to use. - :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. - :type cpu_cfs_quota: bool - :param cpu_cfs_quota_period: Sets CPU CFS quota period value. - :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. - :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. - :type image_gc_low_threshold: int - :param topology_manager_policy: Topology Manager policy to use. - :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). - :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. - :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. - :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. - :type container_log_max_files: int - :param pod_max_pids: The maximum number of processes per pod. - :type pod_max_pids: int - """ - - _validation = { - 'container_log_max_files': {'minimum': 2}, - } - - _attribute_map = { - 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, - 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, - 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, - 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, - 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, - 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, - 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, - 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, - 'container_log_max_size_mb': {'key': 'containerLogMaxSizeMB', 'type': 'int'}, - 'container_log_max_files': {'key': 'containerLogMaxFiles', 'type': 'int'}, - 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(KubeletConfig, self).__init__(**kwargs) - self.cpu_manager_policy = kwargs.get('cpu_manager_policy', None) - self.cpu_cfs_quota = kwargs.get('cpu_cfs_quota', None) - self.cpu_cfs_quota_period = kwargs.get('cpu_cfs_quota_period', None) - self.image_gc_high_threshold = kwargs.get('image_gc_high_threshold', None) - self.image_gc_low_threshold = kwargs.get('image_gc_low_threshold', None) - self.topology_manager_policy = kwargs.get('topology_manager_policy', None) - self.allowed_unsafe_sysctls = kwargs.get('allowed_unsafe_sysctls', None) - self.fail_swap_on = kwargs.get('fail_swap_on', None) - self.container_log_max_size_mb = kwargs.get('container_log_max_size_mb', None) - self.container_log_max_files = kwargs.get('container_log_max_files', None) - self.pod_max_pids = kwargs.get('pod_max_pids', None) - - -class LinuxOSConfig(Model): - """OS configurations of Linux agent nodes. - - :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2021_02_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. - :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. - :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. - :type swap_file_size_mb: int - """ - - _attribute_map = { - 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, - 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, - 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, - 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(LinuxOSConfig, self).__init__(**kwargs) - self.sysctls = kwargs.get('sysctls', None) - self.transparent_huge_page_enabled = kwargs.get('transparent_huge_page_enabled', None) - self.transparent_huge_page_defrag = kwargs.get('transparent_huge_page_defrag', None) - self.swap_file_size_mb = kwargs.get('swap_file_size_mb', None) - - -class MaintenanceConfiguration(SubResource): - """maintenance configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2021_02_01.models.SystemData - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_02_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_02_01.models.TimeSpan] - """ - - _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'}, - 'time_in_week': {'key': 'properties.timeInWeek', 'type': '[TimeInWeek]'}, - 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, - } - - def __init__(self, **kwargs): - super(MaintenanceConfiguration, self).__init__(**kwargs) - self.system_data = None - self.time_in_week = kwargs.get('time_in_week', None) - self.not_allowed_time = kwargs.get('not_allowed_time', None) - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :param fqdn_subdomain: FQDN subdomain specified when creating private - cluster with custom private dns zone. - :type fqdn_subdomain: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy - config. - :vartype azure_portal_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAddonProfile] - :param pod_identity_profile: Profile of managed cluster pod identity. - :type pod_identity_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAADProfile - :param auto_upgrade_profile: Profile of auto upgrade configuration. - :type auto_upgrade_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - 'azure_portal_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn_subdomain': {'key': 'properties.fqdnSubdomain', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn_subdomain = kwargs.get('fqdn_subdomain', None) - self.fqdn = None - self.private_fqdn = None - self.azure_portal_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.pod_identity_profile = kwargs.get('pod_identity_profile', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_upgrade_profile = kwargs.get('auto_upgrade_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = kwargs.get('managed', None) - self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_02_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.kubelet_disk_type = kwargs.get('kubelet_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.pod_subnet_id = kwargs.get('pod_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.node_public_ip_prefix_id = kwargs.get('node_public_ip_prefix_id', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - self.kubelet_config = kwargs.get('kubelet_config', None) - self.linux_os_config = kwargs.get('linux_os_config', None) - self.enable_encryption_at_host = kwargs.get('enable_encryption_at_host', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_02_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - :param private_dns_zone: Private dns zone mode for private cluster. - :type private_dns_zone: str - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - self.private_dns_zone = kwargs.get('private_dns_zone', None) - - -class ManagedClusterAutoUpgradeProfile(Model): - """Auto upgrade profile for a managed cluster. - - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2021_02_01.models.UpgradeChannel - """ - - _attribute_map = { - 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) - self.upgrade_channel = kwargs.get('upgrade_channel', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2021_02_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2021_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2021_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPodIdentity(Model): - """ManagedClusterPodIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity. - :type name: str - :param namespace: Required. Namespace of the pod identity. - :type namespace: str - :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2021_02_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityProvisioningState - :ivar provisioning_info: - :vartype provisioning_info: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityProvisioningInfo - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'identity': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_info': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.identity = kwargs.get('identity', None) - self.provisioning_state = None - self.provisioning_info = None - - -class ManagedClusterPodIdentityException(Model): - """ManagedClusterPodIdentityException. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity exception. - :type name: str - :param namespace: Required. Namespace of the pod identity exception. - :type namespace: str - :param pod_labels: Required. Pod labels to match. - :type pod_labels: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'pod_labels': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.pod_labels = kwargs.get('pod_labels', None) - - -class ManagedClusterPodIdentityProfile(Model): - """ManagedClusterPodIdentityProfile. - - :param enabled: Whether the pod identity addon is enabled. - :type enabled: bool - :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod - identity addon in cluster using Kubenet network plugin. - :type allow_network_plugin_kubenet: bool - :param user_assigned_identities: User assigned pod identity settings. - :type user_assigned_identities: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. - :type user_assigned_identity_exceptions: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityException] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'allow_network_plugin_kubenet': {'key': 'allowNetworkPluginKubenet', 'type': 'bool'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, - 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.allow_network_plugin_kubenet = kwargs.get('allow_network_plugin_kubenet', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - self.user_assigned_identity_exceptions = kwargs.get('user_assigned_identity_exceptions', None) - - -class ManagedClusterPodIdentityProvisioningInfo(Model): - """ManagedClusterPodIdentityProvisioningInfo. - - :param error: Pod identity assignment error (if any). - :type error: ~azure.mgmt.containerservice.v2021_02_01.models.CloudError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudError'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2021_02_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_node_provision_time: - :type max_node_provision_time: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_node_provision_time': {'key': 'max-node-provision-time', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) - self.expander = kwargs.get('expander', None) - self.max_empty_bulk_delete = kwargs.get('max_empty_bulk_delete', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - self.max_node_provision_time = kwargs.get('max_node_provision_time', None) - self.max_total_unready_percentage = kwargs.get('max_total_unready_percentage', None) - self.new_pod_scale_up_delay = kwargs.get('new_pod_scale_up_delay', None) - self.ok_total_unready_count = kwargs.get('ok_total_unready_count', None) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.skip_nodes_with_local_storage = kwargs.get('skip_nodes_with_local_storage', None) - self.skip_nodes_with_system_pods = kwargs.get('skip_nodes_with_system_pods', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.LicenseType - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.license_type = kwargs.get('license_type', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2021_02_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PowerState, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.group_id = kwargs.get('group_id', None) - self.required_members = kwargs.get('required_members', None) - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class RunCommandRequest(Model): - """run command request. - - :param command: command to run. - :type command: str - :param context: base64 encoded zip file, contains files required by the - command - :type context: str - :param cluster_token: AuthToken issued for AKS AAD Server App. - :type cluster_token: str - """ - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'cluster_token': {'key': 'clusterToken', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandRequest, self).__init__(**kwargs) - self.command = kwargs.get('command', None) - self.context = kwargs.get('context', None) - self.cluster_token = kwargs.get('cluster_token', None) - - -class RunCommandResult(Model): - """run command result. - - :param id: command id. - :type id: str - :param provisioning_state: provisioning State - :type provisioning_state: str - :param exit_code: exit code of the command - :type exit_code: int - :param started_at: time when the command started. - :type started_at: datetime - :param finished_at: time when the command finished. - :type finished_at: datetime - :param logs: command output. - :type logs: str - :param reason: explain why provisioningState is set to failed (if so). - :type reason: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'exit_code': {'key': 'properties.exitCode', 'type': 'int'}, - 'started_at': {'key': 'properties.startedAt', 'type': 'iso-8601'}, - 'finished_at': {'key': 'properties.finishedAt', 'type': 'iso-8601'}, - 'logs': {'key': 'properties.logs', 'type': 'str'}, - 'reason': {'key': 'properties.reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandResult, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.exit_code = kwargs.get('exit_code', None) - self.started_at = kwargs.get('started_at', None) - self.finished_at = kwargs.get('finished_at', None) - self.logs = kwargs.get('logs', None) - self.reason = kwargs.get('reason', None) - - -class SysctlConfig(Model): - """Sysctl settings for Linux agent nodes. - - :param net_core_somaxconn: Sysctl setting net.core.somaxconn. - :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. - :type net_core_netdev_max_backlog: int - :param net_core_rmem_default: Sysctl setting net.core.rmem_default. - :type net_core_rmem_default: int - :param net_core_rmem_max: Sysctl setting net.core.rmem_max. - :type net_core_rmem_max: int - :param net_core_wmem_default: Sysctl setting net.core.wmem_default. - :type net_core_wmem_default: int - :param net_core_wmem_max: Sysctl setting net.core.wmem_max. - :type net_core_wmem_max: int - :param net_core_optmem_max: Sysctl setting net.core.optmem_max. - :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. - :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. - :type net_ipv4_tcp_max_tw_buckets: int - :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. - :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. - :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. - :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. - :type net_ipv4_tcpkeepalive_intvl: int - :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. - :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. - :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. - :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. - :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. - :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. - :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. - :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. - :type fs_inotify_max_user_watches: int - :param fs_file_max: Sysctl setting fs.file-max. - :type fs_file_max: int - :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. - :type fs_aio_max_nr: int - :param fs_nr_open: Sysctl setting fs.nr_open. - :type fs_nr_open: int - :param kernel_threads_max: Sysctl setting kernel.threads-max. - :type kernel_threads_max: int - :param vm_max_map_count: Sysctl setting vm.max_map_count. - :type vm_max_map_count: int - :param vm_swappiness: Sysctl setting vm.swappiness. - :type vm_swappiness: int - :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. - :type vm_vfs_cache_pressure: int - """ - - _attribute_map = { - 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, - 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, - 'net_core_rmem_default': {'key': 'netCoreRmemDefault', 'type': 'int'}, - 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, - 'net_core_wmem_default': {'key': 'netCoreWmemDefault', 'type': 'int'}, - 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, - 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, - 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, - 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, - 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, - 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, - 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, - 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, - 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, - 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, - 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, - 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, - 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, - 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, - 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, - 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, - 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, - 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, - 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SysctlConfig, self).__init__(**kwargs) - self.net_core_somaxconn = kwargs.get('net_core_somaxconn', None) - self.net_core_netdev_max_backlog = kwargs.get('net_core_netdev_max_backlog', None) - self.net_core_rmem_default = kwargs.get('net_core_rmem_default', None) - self.net_core_rmem_max = kwargs.get('net_core_rmem_max', None) - self.net_core_wmem_default = kwargs.get('net_core_wmem_default', None) - self.net_core_wmem_max = kwargs.get('net_core_wmem_max', None) - self.net_core_optmem_max = kwargs.get('net_core_optmem_max', None) - self.net_ipv4_tcp_max_syn_backlog = kwargs.get('net_ipv4_tcp_max_syn_backlog', None) - self.net_ipv4_tcp_max_tw_buckets = kwargs.get('net_ipv4_tcp_max_tw_buckets', None) - self.net_ipv4_tcp_fin_timeout = kwargs.get('net_ipv4_tcp_fin_timeout', None) - self.net_ipv4_tcp_keepalive_time = kwargs.get('net_ipv4_tcp_keepalive_time', None) - self.net_ipv4_tcp_keepalive_probes = kwargs.get('net_ipv4_tcp_keepalive_probes', None) - self.net_ipv4_tcpkeepalive_intvl = kwargs.get('net_ipv4_tcpkeepalive_intvl', None) - self.net_ipv4_tcp_tw_reuse = kwargs.get('net_ipv4_tcp_tw_reuse', None) - self.net_ipv4_ip_local_port_range = kwargs.get('net_ipv4_ip_local_port_range', None) - self.net_ipv4_neigh_default_gc_thresh1 = kwargs.get('net_ipv4_neigh_default_gc_thresh1', None) - self.net_ipv4_neigh_default_gc_thresh2 = kwargs.get('net_ipv4_neigh_default_gc_thresh2', None) - self.net_ipv4_neigh_default_gc_thresh3 = kwargs.get('net_ipv4_neigh_default_gc_thresh3', None) - self.net_netfilter_nf_conntrack_max = kwargs.get('net_netfilter_nf_conntrack_max', None) - self.net_netfilter_nf_conntrack_buckets = kwargs.get('net_netfilter_nf_conntrack_buckets', None) - self.fs_inotify_max_user_watches = kwargs.get('fs_inotify_max_user_watches', None) - self.fs_file_max = kwargs.get('fs_file_max', None) - self.fs_aio_max_nr = kwargs.get('fs_aio_max_nr', None) - self.fs_nr_open = kwargs.get('fs_nr_open', None) - self.kernel_threads_max = kwargs.get('kernel_threads_max', None) - self.vm_max_map_count = kwargs.get('vm_max_map_count', None) - self.vm_swappiness = kwargs.get('vm_swappiness', None) - self.vm_vfs_cache_pressure = kwargs.get('vm_vfs_cache_pressure', None) - - -class SystemData(Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' - :type last_modified_by_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: 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): - 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) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - - -class TimeInWeek(Model): - """Time in a week. - - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - :type day: str or ~azure.mgmt.containerservice.v2021_02_01.models.WeekDay - :param hour_slots: hour slots in a day. - :type hour_slots: list[int] - """ - - _attribute_map = { - 'day': {'key': 'day', 'type': 'str'}, - 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, - } - - def __init__(self, **kwargs): - super(TimeInWeek, self).__init__(**kwargs) - self.day = kwargs.get('day', None) - self.hour_slots = kwargs.get('hour_slots', None) - - -class TimeSpan(Model): - """The time span with start and end properties. - - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime - """ - - _attribute_map = { - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(TimeSpan, self).__init__(**kwargs) - self.start = kwargs.get('start', None) - self.end = kwargs.get('end', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_models_py3.py deleted file mode 100644 index 6984a0a5a66..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_models_py3.py +++ /dev/null @@ -1,3137 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_02_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'properties.kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'properties.nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'properties.enableEncryptionAtHost', 'type': 'bool'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.kubelet_disk_type = kubelet_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.pod_subnet_id = pod_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.node_public_ip_prefix_id = node_public_ip_prefix_id - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - self.kubelet_config = kubelet_config - self.linux_os_config = linux_os_config - self.enable_encryption_at_host = enable_encryption_at_host - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - self.latest_node_image_version = latest_node_image_version - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, *, max_surge: str=None, **kwargs) -> None: - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = max_surge - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2021_02_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2021_02_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2021_02_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2021_02_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2021_02_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class KubeletConfig(Model): - """Kubelet configurations of agent nodes. - - :param cpu_manager_policy: CPU Manager policy to use. - :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. - :type cpu_cfs_quota: bool - :param cpu_cfs_quota_period: Sets CPU CFS quota period value. - :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. - :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. - :type image_gc_low_threshold: int - :param topology_manager_policy: Topology Manager policy to use. - :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). - :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. - :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. - :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. - :type container_log_max_files: int - :param pod_max_pids: The maximum number of processes per pod. - :type pod_max_pids: int - """ - - _validation = { - 'container_log_max_files': {'minimum': 2}, - } - - _attribute_map = { - 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, - 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, - 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, - 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, - 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, - 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, - 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, - 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, - 'container_log_max_size_mb': {'key': 'containerLogMaxSizeMB', 'type': 'int'}, - 'container_log_max_files': {'key': 'containerLogMaxFiles', 'type': 'int'}, - 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, - } - - def __init__(self, *, cpu_manager_policy: str=None, cpu_cfs_quota: bool=None, cpu_cfs_quota_period: str=None, image_gc_high_threshold: int=None, image_gc_low_threshold: int=None, topology_manager_policy: str=None, allowed_unsafe_sysctls=None, fail_swap_on: bool=None, container_log_max_size_mb: int=None, container_log_max_files: int=None, pod_max_pids: int=None, **kwargs) -> None: - super(KubeletConfig, self).__init__(**kwargs) - self.cpu_manager_policy = cpu_manager_policy - self.cpu_cfs_quota = cpu_cfs_quota - self.cpu_cfs_quota_period = cpu_cfs_quota_period - self.image_gc_high_threshold = image_gc_high_threshold - self.image_gc_low_threshold = image_gc_low_threshold - self.topology_manager_policy = topology_manager_policy - self.allowed_unsafe_sysctls = allowed_unsafe_sysctls - self.fail_swap_on = fail_swap_on - self.container_log_max_size_mb = container_log_max_size_mb - self.container_log_max_files = container_log_max_files - self.pod_max_pids = pod_max_pids - - -class LinuxOSConfig(Model): - """OS configurations of Linux agent nodes. - - :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2021_02_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. - :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. - :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. - :type swap_file_size_mb: int - """ - - _attribute_map = { - 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, - 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, - 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, - 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, - } - - def __init__(self, *, sysctls=None, transparent_huge_page_enabled: str=None, transparent_huge_page_defrag: str=None, swap_file_size_mb: int=None, **kwargs) -> None: - super(LinuxOSConfig, self).__init__(**kwargs) - self.sysctls = sysctls - self.transparent_huge_page_enabled = transparent_huge_page_enabled - self.transparent_huge_page_defrag = transparent_huge_page_defrag - self.swap_file_size_mb = swap_file_size_mb - - -class MaintenanceConfiguration(SubResource): - """maintenance configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2021_02_01.models.SystemData - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_02_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_02_01.models.TimeSpan] - """ - - _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'}, - 'time_in_week': {'key': 'properties.timeInWeek', 'type': '[TimeInWeek]'}, - 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, - } - - def __init__(self, *, time_in_week=None, not_allowed_time=None, **kwargs) -> None: - super(MaintenanceConfiguration, self).__init__(**kwargs) - self.system_data = None - self.time_in_week = time_in_week - self.not_allowed_time = not_allowed_time - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :param fqdn_subdomain: FQDN subdomain specified when creating private - cluster with custom private dns zone. - :type fqdn_subdomain: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy - config. - :vartype azure_portal_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAddonProfile] - :param pod_identity_profile: Profile of managed cluster pod identity. - :type pod_identity_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAADProfile - :param auto_upgrade_profile: Profile of auto upgrade configuration. - :type auto_upgrade_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - 'azure_portal_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn_subdomain': {'key': 'properties.fqdnSubdomain', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, fqdn_subdomain: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, pod_identity_profile=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_upgrade_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn_subdomain = fqdn_subdomain - self.fqdn = None - self.private_fqdn = None - self.azure_portal_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.pod_identity_profile = pod_identity_profile - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_upgrade_profile = auto_upgrade_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - self.sku = sku - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = managed - self.enable_azure_rbac = enable_azure_rbac - self.admin_group_object_ids = admin_group_object_ids - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_02_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.kubelet_disk_type = kubelet_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.pod_subnet_id = pod_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.node_public_ip_prefix_id = node_public_ip_prefix_id - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - self.kubelet_config = kubelet_config - self.linux_os_config = linux_os_config - self.enable_encryption_at_host = enable_encryption_at_host - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_02_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, os_disk_type=os_disk_type, kubelet_disk_type=kubelet_disk_type, vnet_subnet_id=vnet_subnet_id, pod_subnet_id=pod_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, node_public_ip_prefix_id=node_public_ip_prefix_id, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, kubelet_config=kubelet_config, linux_os_config=linux_os_config, enable_encryption_at_host=enable_encryption_at_host, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - :param private_dns_zone: Private dns zone mode for private cluster. - :type private_dns_zone: str - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, private_dns_zone: str=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - self.private_dns_zone = private_dns_zone - - -class ManagedClusterAutoUpgradeProfile(Model): - """Auto upgrade profile for a managed cluster. - - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2021_02_01.models.UpgradeChannel - """ - - _attribute_map = { - 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, - } - - def __init__(self, *, upgrade_channel=None, **kwargs) -> None: - super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) - self.upgrade_channel = upgrade_channel - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2021_02_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2021_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2021_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPodIdentity(Model): - """ManagedClusterPodIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity. - :type name: str - :param namespace: Required. Namespace of the pod identity. - :type namespace: str - :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2021_02_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityProvisioningState - :ivar provisioning_info: - :vartype provisioning_info: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityProvisioningInfo - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'identity': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_info': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, - } - - def __init__(self, *, name: str, namespace: str, identity, **kwargs) -> None: - super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = name - self.namespace = namespace - self.identity = identity - self.provisioning_state = None - self.provisioning_info = None - - -class ManagedClusterPodIdentityException(Model): - """ManagedClusterPodIdentityException. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity exception. - :type name: str - :param namespace: Required. Namespace of the pod identity exception. - :type namespace: str - :param pod_labels: Required. Pod labels to match. - :type pod_labels: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'pod_labels': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, - } - - def __init__(self, *, name: str, namespace: str, pod_labels, **kwargs) -> None: - super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = name - self.namespace = namespace - self.pod_labels = pod_labels - - -class ManagedClusterPodIdentityProfile(Model): - """ManagedClusterPodIdentityProfile. - - :param enabled: Whether the pod identity addon is enabled. - :type enabled: bool - :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod - identity addon in cluster using Kubenet network plugin. - :type allow_network_plugin_kubenet: bool - :param user_assigned_identities: User assigned pod identity settings. - :type user_assigned_identities: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. - :type user_assigned_identity_exceptions: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityException] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'allow_network_plugin_kubenet': {'key': 'allowNetworkPluginKubenet', 'type': 'bool'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, - 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, - } - - def __init__(self, *, enabled: bool=None, allow_network_plugin_kubenet: bool=None, user_assigned_identities=None, user_assigned_identity_exceptions=None, **kwargs) -> None: - super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) - self.enabled = enabled - self.allow_network_plugin_kubenet = allow_network_plugin_kubenet - self.user_assigned_identities = user_assigned_identities - self.user_assigned_identity_exceptions = user_assigned_identity_exceptions - - -class ManagedClusterPodIdentityProvisioningInfo(Model): - """ManagedClusterPodIdentityProvisioningInfo. - - :param error: Pod identity assignment error (if any). - :type error: ~azure.mgmt.containerservice.v2021_02_01.models.CloudError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudError'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) - self.error = error - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2021_02_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_node_provision_time: - :type max_node_provision_time: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_node_provision_time': {'key': 'max-node-provision-time', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_empty_bulk_delete: str=None, max_graceful_termination_sec: str=None, max_node_provision_time: str=None, max_total_unready_percentage: str=None, new_pod_scale_up_delay: str=None, ok_total_unready_count: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, skip_nodes_with_local_storage: str=None, skip_nodes_with_system_pods: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = balance_similar_node_groups - self.expander = expander - self.max_empty_bulk_delete = max_empty_bulk_delete - self.max_graceful_termination_sec = max_graceful_termination_sec - self.max_node_provision_time = max_node_provision_time - self.max_total_unready_percentage = max_total_unready_percentage - self.new_pod_scale_up_delay = new_pod_scale_up_delay - self.ok_total_unready_count = ok_total_unready_count - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.skip_nodes_with_local_storage = skip_nodes_with_local_storage - self.skip_nodes_with_system_pods = skip_nodes_with_system_pods - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, tier=None, **kwargs) -> None: - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.LicenseType - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, license_type=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - self.license_type = license_type - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2021_02_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, *, code=None, **kwargs) -> None: - super(PowerState, self).__init__(**kwargs) - self.code = code - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = id - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: str=None, required_members=None, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.group_id = group_id - self.required_members = required_members - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class RunCommandRequest(Model): - """run command request. - - :param command: command to run. - :type command: str - :param context: base64 encoded zip file, contains files required by the - command - :type context: str - :param cluster_token: AuthToken issued for AKS AAD Server App. - :type cluster_token: str - """ - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'cluster_token': {'key': 'clusterToken', 'type': 'str'}, - } - - def __init__(self, *, command: str=None, context: str=None, cluster_token: str=None, **kwargs) -> None: - super(RunCommandRequest, self).__init__(**kwargs) - self.command = command - self.context = context - self.cluster_token = cluster_token - - -class RunCommandResult(Model): - """run command result. - - :param id: command id. - :type id: str - :param provisioning_state: provisioning State - :type provisioning_state: str - :param exit_code: exit code of the command - :type exit_code: int - :param started_at: time when the command started. - :type started_at: datetime - :param finished_at: time when the command finished. - :type finished_at: datetime - :param logs: command output. - :type logs: str - :param reason: explain why provisioningState is set to failed (if so). - :type reason: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'exit_code': {'key': 'properties.exitCode', 'type': 'int'}, - 'started_at': {'key': 'properties.startedAt', 'type': 'iso-8601'}, - 'finished_at': {'key': 'properties.finishedAt', 'type': 'iso-8601'}, - 'logs': {'key': 'properties.logs', 'type': 'str'}, - 'reason': {'key': 'properties.reason', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, provisioning_state: str=None, exit_code: int=None, started_at=None, finished_at=None, logs: str=None, reason: str=None, **kwargs) -> None: - super(RunCommandResult, self).__init__(**kwargs) - self.id = id - self.provisioning_state = provisioning_state - self.exit_code = exit_code - self.started_at = started_at - self.finished_at = finished_at - self.logs = logs - self.reason = reason - - -class SysctlConfig(Model): - """Sysctl settings for Linux agent nodes. - - :param net_core_somaxconn: Sysctl setting net.core.somaxconn. - :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. - :type net_core_netdev_max_backlog: int - :param net_core_rmem_default: Sysctl setting net.core.rmem_default. - :type net_core_rmem_default: int - :param net_core_rmem_max: Sysctl setting net.core.rmem_max. - :type net_core_rmem_max: int - :param net_core_wmem_default: Sysctl setting net.core.wmem_default. - :type net_core_wmem_default: int - :param net_core_wmem_max: Sysctl setting net.core.wmem_max. - :type net_core_wmem_max: int - :param net_core_optmem_max: Sysctl setting net.core.optmem_max. - :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. - :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. - :type net_ipv4_tcp_max_tw_buckets: int - :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. - :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. - :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. - :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. - :type net_ipv4_tcpkeepalive_intvl: int - :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. - :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. - :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. - :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. - :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. - :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. - :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. - :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. - :type fs_inotify_max_user_watches: int - :param fs_file_max: Sysctl setting fs.file-max. - :type fs_file_max: int - :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. - :type fs_aio_max_nr: int - :param fs_nr_open: Sysctl setting fs.nr_open. - :type fs_nr_open: int - :param kernel_threads_max: Sysctl setting kernel.threads-max. - :type kernel_threads_max: int - :param vm_max_map_count: Sysctl setting vm.max_map_count. - :type vm_max_map_count: int - :param vm_swappiness: Sysctl setting vm.swappiness. - :type vm_swappiness: int - :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. - :type vm_vfs_cache_pressure: int - """ - - _attribute_map = { - 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, - 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, - 'net_core_rmem_default': {'key': 'netCoreRmemDefault', 'type': 'int'}, - 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, - 'net_core_wmem_default': {'key': 'netCoreWmemDefault', 'type': 'int'}, - 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, - 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, - 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, - 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, - 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, - 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, - 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, - 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, - 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, - 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, - 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, - 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, - 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, - 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, - 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, - 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, - 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, - 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, - 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, - } - - def __init__(self, *, net_core_somaxconn: int=None, net_core_netdev_max_backlog: int=None, net_core_rmem_default: int=None, net_core_rmem_max: int=None, net_core_wmem_default: int=None, net_core_wmem_max: int=None, net_core_optmem_max: int=None, net_ipv4_tcp_max_syn_backlog: int=None, net_ipv4_tcp_max_tw_buckets: int=None, net_ipv4_tcp_fin_timeout: int=None, net_ipv4_tcp_keepalive_time: int=None, net_ipv4_tcp_keepalive_probes: int=None, net_ipv4_tcpkeepalive_intvl: int=None, net_ipv4_tcp_tw_reuse: bool=None, net_ipv4_ip_local_port_range: str=None, net_ipv4_neigh_default_gc_thresh1: int=None, net_ipv4_neigh_default_gc_thresh2: int=None, net_ipv4_neigh_default_gc_thresh3: int=None, net_netfilter_nf_conntrack_max: int=None, net_netfilter_nf_conntrack_buckets: int=None, fs_inotify_max_user_watches: int=None, fs_file_max: int=None, fs_aio_max_nr: int=None, fs_nr_open: int=None, kernel_threads_max: int=None, vm_max_map_count: int=None, vm_swappiness: int=None, vm_vfs_cache_pressure: int=None, **kwargs) -> None: - super(SysctlConfig, self).__init__(**kwargs) - self.net_core_somaxconn = net_core_somaxconn - self.net_core_netdev_max_backlog = net_core_netdev_max_backlog - self.net_core_rmem_default = net_core_rmem_default - self.net_core_rmem_max = net_core_rmem_max - self.net_core_wmem_default = net_core_wmem_default - self.net_core_wmem_max = net_core_wmem_max - self.net_core_optmem_max = net_core_optmem_max - self.net_ipv4_tcp_max_syn_backlog = net_ipv4_tcp_max_syn_backlog - self.net_ipv4_tcp_max_tw_buckets = net_ipv4_tcp_max_tw_buckets - self.net_ipv4_tcp_fin_timeout = net_ipv4_tcp_fin_timeout - self.net_ipv4_tcp_keepalive_time = net_ipv4_tcp_keepalive_time - self.net_ipv4_tcp_keepalive_probes = net_ipv4_tcp_keepalive_probes - self.net_ipv4_tcpkeepalive_intvl = net_ipv4_tcpkeepalive_intvl - self.net_ipv4_tcp_tw_reuse = net_ipv4_tcp_tw_reuse - self.net_ipv4_ip_local_port_range = net_ipv4_ip_local_port_range - self.net_ipv4_neigh_default_gc_thresh1 = net_ipv4_neigh_default_gc_thresh1 - self.net_ipv4_neigh_default_gc_thresh2 = net_ipv4_neigh_default_gc_thresh2 - self.net_ipv4_neigh_default_gc_thresh3 = net_ipv4_neigh_default_gc_thresh3 - self.net_netfilter_nf_conntrack_max = net_netfilter_nf_conntrack_max - self.net_netfilter_nf_conntrack_buckets = net_netfilter_nf_conntrack_buckets - self.fs_inotify_max_user_watches = fs_inotify_max_user_watches - self.fs_file_max = fs_file_max - self.fs_aio_max_nr = fs_aio_max_nr - self.fs_nr_open = fs_nr_open - self.kernel_threads_max = kernel_threads_max - self.vm_max_map_count = vm_max_map_count - self.vm_swappiness = vm_swappiness - self.vm_vfs_cache_pressure = vm_vfs_cache_pressure - - -class SystemData(Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' - :type last_modified_by_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: 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: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: - 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 - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags - - -class TimeInWeek(Model): - """Time in a week. - - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - :type day: str or ~azure.mgmt.containerservice.v2021_02_01.models.WeekDay - :param hour_slots: hour slots in a day. - :type hour_slots: list[int] - """ - - _attribute_map = { - 'day': {'key': 'day', 'type': 'str'}, - 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, - } - - def __init__(self, *, day=None, hour_slots=None, **kwargs) -> None: - super(TimeInWeek, self).__init__(**kwargs) - self.day = day - self.hour_slots = hour_slots - - -class TimeSpan(Model): - """The time span with start and end properties. - - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime - """ - - _attribute_map = { - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - } - - def __init__(self, *, start=None, end=None, **kwargs) -> None: - super(TimeSpan, self).__init__(**kwargs) - self.start = start - self.end = end diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_paged_models.py deleted file mode 100644 index 725952adaf8..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_paged_models.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class MaintenanceConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`MaintenanceConfiguration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MaintenanceConfiguration]'} - } - - def __init__(self, *args, **kwargs): - - super(MaintenanceConfigurationPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_agent_pools_operations.py deleted file mode 100644 index 703435e5b60..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,610 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-02-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2021_02_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2021_02_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_02_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_02_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} - - - def _upgrade_node_image_version_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.upgrade_node_image_version.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 202: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def upgrade_node_image_version( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrade node image version of an agent pool to the latest. - - Upgrade node image version of an agent pool to the latest. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_02_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_02_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._upgrade_node_image_version_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_maintenance_configurations_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_maintenance_configurations_operations.py deleted file mode 100644 index fc4f3c96c7c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_maintenance_configurations_operations.py +++ /dev/null @@ -1,387 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class MaintenanceConfigurationsOperations(object): - """MaintenanceConfigurationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-02-01" - - self.config = config - - def list_by_managed_cluster( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of maintenance configurations in the specified managed - cluster. - - Gets a list of maintenance configurations in the specified managed - cluster. The operation returns properties of each maintenance - configuration. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of MaintenanceConfiguration - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.MaintenanceConfigurationPaged[~azure.mgmt.containerservice.v2021_02_01.models.MaintenanceConfiguration] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_managed_cluster.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.MaintenanceConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} - - def get( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): - """Gets the maintenance configuration. - - Gets the details of maintenance configurations by managed cluster and - resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MaintenanceConfiguration or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.MaintenanceConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, **operation_config): - parameters = models.MaintenanceConfiguration(time_in_week=time_in_week, not_allowed_time=not_allowed_time) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a maintenance configurations. - - Creates or updates a maintenance configuration in the specified managed - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_02_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_02_01.models.TimeSpan] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - MaintenanceConfiguration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_02_01.models.MaintenanceConfiguration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_02_01.models.MaintenanceConfiguration]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - time_in_week=time_in_week, - not_allowed_time=not_allowed_time, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a maintenance configuration. - - Deletes the maintenance configuration in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_managed_clusters_operations.py deleted file mode 100644 index e9f7f05452f..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1473 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} - - - def _stop_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stop Managed Cluster. - - Stops a Running Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} - - - def _start_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Start Managed Cluster. - - Starts a Stopped Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} - - - def _run_command_initial( - self, resource_group_name, resource_name, request_payload, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.run_command.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request_payload, 'RunCommandRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def run_command( - self, resource_group_name, resource_name, request_payload, custom_headers=None, raw=False, polling=True, **operation_config): - """Run Command against Managed Kubernetes Service. - - Submit a command to run against managed kubernetes service, it will - create a pod to run the command. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param request_payload: Parameters supplied to the RunCommand - operation. - :type request_payload: - ~azure.mgmt.containerservice.v2021_02_01.models.RunCommandRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_02_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_02_01.models.RunCommandResult]] - :raises: :class:`CloudError` - """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - request_payload=request_payload, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} - - def get_command_result( - self, resource_group_name, resource_name, command_id, custom_headers=None, raw=False, **operation_config): - """Get command result. - - Get command result from previous runCommand invoke. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param command_id: Id of the command request. - :type command_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RunCommandResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.RunCommandResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_command_result.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'commandId': self._serialize.url("command_id", command_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_command_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_operations.py deleted file mode 100644 index 81433d715ef..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2021_02_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index 7e0068570c4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,348 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-02-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private endpoint connections in the specified managed - cluster. - - Gets a list of private endpoint connections in the specified managed - cluster. The operation returns properties of each private endpoint - connection. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnectionListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} - - def get( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """Gets the private endpoint connection. - - Gets the details of the private endpoint connection by managed cluster - and resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def update( - self, resource_group_name, resource_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): - """Updates a private endpoint connection. - - Updates a private endpoint connection in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a private endpoint connection. - - Deletes the private endpoint connection in the specified managed - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_private_link_resources_operations.py deleted file mode 100644 index 6971ca8fd27..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class PrivateLinkResourcesOperations(object): - """PrivateLinkResourcesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-02-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private link resources in the specified managed cluster. - - Gets a list of private link resources in the specified managed cluster. - The operation returns properties of each private link resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkResourcesListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_resolve_private_link_service_id_operations.py deleted file mode 100644 index e53b737880f..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_resolve_private_link_service_id_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ResolvePrivateLinkServiceIdOperations(object): - """ResolvePrivateLinkServiceIdOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-02-01" - - self.config = config - - def post( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - """Gets the private link service ID for the specified managed cluster. - - Gets the private link service ID the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters (name, groupId) supplied in order to - resolve a private link service ID. - :type parameters: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.post.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateLinkResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/version.py deleted file mode 100644 index 28b76590866..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2021-02-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/_container_service_client.py deleted file mode 100644 index 64f594ce8fb..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/_container_service_client.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import MaintenanceConfigurationsOperations -from .operations import AgentPoolsOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ResolvePrivateLinkServiceIdOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2021_03_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2021_03_01.operations.ManagedClustersOperations - :ivar maintenance_configurations: MaintenanceConfigurations operations - :vartype maintenance_configurations: azure.mgmt.containerservice.v2021_03_01.operations.MaintenanceConfigurationsOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2021_03_01.operations.AgentPoolsOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations - :vartype private_endpoint_connections: azure.mgmt.containerservice.v2021_03_01.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations - :vartype private_link_resources: azure.mgmt.containerservice.v2021_03_01.operations.PrivateLinkResourcesOperations - :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceId operations - :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2021_03_01.operations.ResolvePrivateLinkServiceIdOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2021-03-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.maintenance_configurations = MaintenanceConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/__init__.py deleted file mode 100644 index 3eb3201a59a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/__init__.py +++ /dev/null @@ -1,288 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import AgentPoolUpgradeSettings - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ExtendedLocation - from ._models_py3 import KubeletConfig - from ._models_py3 import LinuxOSConfig - from ._models_py3 import MaintenanceConfiguration - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterAutoUpgradeProfile - from ._models_py3 import ManagedClusterHTTPProxyConfig - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPodIdentity - from ._models_py3 import ManagedClusterPodIdentityException - from ._models_py3 import ManagedClusterPodIdentityProfile - from ._models_py3 import ManagedClusterPodIdentityProvisioningInfo - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterSKU - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import OSOptionProfile - from ._models_py3 import OSOptionProperty - from ._models_py3 import PowerState - from ._models_py3 import PrivateEndpoint - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointConnectionListResult - from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkResourcesListResult - from ._models_py3 import PrivateLinkServiceConnectionState - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import RunCommandRequest - from ._models_py3 import RunCommandResult - from ._models_py3 import SubResource - from ._models_py3 import SysctlConfig - from ._models_py3 import SystemData - from ._models_py3 import TagsObject - from ._models_py3 import TimeInWeek - from ._models_py3 import TimeSpan - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ExtendedLocation - from ._models import KubeletConfig - from ._models import LinuxOSConfig - from ._models import MaintenanceConfiguration - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterAutoUpgradeProfile - from ._models import ManagedClusterHTTPProxyConfig - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPodIdentity - from ._models import ManagedClusterPodIdentityException - from ._models import ManagedClusterPodIdentityProfile - from ._models import ManagedClusterPodIdentityProvisioningInfo - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import OSOptionProfile - from ._models import OSOptionProperty - from ._models import PowerState - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointConnectionListResult - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourcesListResult - from ._models import PrivateLinkServiceConnectionState - from ._models import Resource - from ._models import ResourceReference - from ._models import RunCommandRequest - from ._models import RunCommandResult - from ._models import SubResource - from ._models import SysctlConfig - from ._models import SystemData - from ._models import TagsObject - from ._models import TimeInWeek - from ._models import TimeSpan - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import MaintenanceConfigurationPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSDiskType, - KubeletDiskType, - OSType, - OSSKU, - AgentPoolType, - AgentPoolMode, - Code, - ScaleSetPriority, - ScaleSetEvictionPolicy, - GPUInstanceProfile, - LicenseType, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - CreatedByType, - WeekDay, - ManagedClusterPodIdentityProvisioningState, - UpgradeChannel, - Expander, - ResourceIdentityType, - ManagedClusterSKUName, - ManagedClusterSKUTier, - ExtendedLocationTypes, - PrivateEndpointConnectionProvisioningState, - ConnectionStatus, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'AgentPoolUpgradeSettings', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ExtendedLocation', - 'KubeletConfig', - 'LinuxOSConfig', - 'MaintenanceConfiguration', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterAutoUpgradeProfile', - 'ManagedClusterHTTPProxyConfig', - 'ManagedClusterIdentity', - 'ManagedClusterIdentityUserAssignedIdentitiesValue', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPodIdentity', - 'ManagedClusterPodIdentityException', - 'ManagedClusterPodIdentityProfile', - 'ManagedClusterPodIdentityProvisioningInfo', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterSKU', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'OSOptionProfile', - 'OSOptionProperty', - 'PowerState', - 'PrivateEndpoint', - 'PrivateEndpointConnection', - 'PrivateEndpointConnectionListResult', - 'PrivateLinkResource', - 'PrivateLinkResourcesListResult', - 'PrivateLinkServiceConnectionState', - 'Resource', - 'ResourceReference', - 'RunCommandRequest', - 'RunCommandResult', - 'SubResource', - 'SysctlConfig', - 'SystemData', - 'TagsObject', - 'TimeInWeek', - 'TimeSpan', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'MaintenanceConfigurationPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSDiskType', - 'KubeletDiskType', - 'OSType', - 'OSSKU', - 'AgentPoolType', - 'AgentPoolMode', - 'Code', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'GPUInstanceProfile', - 'LicenseType', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'CreatedByType', - 'WeekDay', - 'ManagedClusterPodIdentityProvisioningState', - 'UpgradeChannel', - 'Expander', - 'ResourceIdentityType', - 'ManagedClusterSKUName', - 'ManagedClusterSKUTier', - 'ExtendedLocationTypes', - 'PrivateEndpointConnectionProvisioningState', - 'ConnectionStatus', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_container_service_client_enums.py deleted file mode 100644 index 07d226f1f08..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,378 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSDiskType(str, Enum): - - managed = "Managed" - ephemeral = "Ephemeral" - - -class KubeletDiskType(str, Enum): - - os = "OS" - temporary = "Temporary" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class OSSKU(str, Enum): - - ubuntu = "Ubuntu" - cbl_mariner = "CBLMariner" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class Code(str, Enum): - - running = "Running" - stopped = "Stopped" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class GPUInstanceProfile(str, Enum): - - mig1g = "MIG1g" - mig2g = "MIG2g" - mig3g = "MIG3g" - mig4g = "MIG4g" - mig7g = "MIG7g" - - -class LicenseType(str, Enum): - - none = "None" - windows_server = "Windows_Server" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class CreatedByType(str, Enum): - - user = "User" - application = "Application" - managed_identity = "ManagedIdentity" - key = "Key" - - -class WeekDay(str, Enum): - - sunday = "Sunday" - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" - - -class ManagedClusterPodIdentityProvisioningState(str, Enum): - - assigned = "Assigned" - updating = "Updating" - deleting = "Deleting" - failed = "Failed" - - -class UpgradeChannel(str, Enum): - - rapid = "rapid" - stable = "stable" - patch = "patch" - node_image = "node-image" - none = "none" - - -class Expander(str, Enum): - - least_waste = "least-waste" - most_pods = "most-pods" - priority = "priority" - random = "random" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" - - -class ExtendedLocationTypes(str, Enum): - - edge_zone = "EdgeZone" - - -class PrivateEndpointConnectionProvisioningState(str, Enum): - - succeeded = "Succeeded" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_models.py deleted file mode 100644 index 44761131706..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_models.py +++ /dev/null @@ -1,3212 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. - :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' - :type os_sku: str or ~azure.mgmt.containerservice.v2021_03_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_03_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param enable_fips: Whether to use FIPS enabled OS - :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' - :type gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.GPUInstanceProfile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'properties.kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'os_sku': {'key': 'properties.osSKU', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'properties.nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'properties.enableEncryptionAtHost', 'type': 'bool'}, - 'enable_fips': {'key': 'properties.enableFIPS', 'type': 'bool'}, - 'gpu_instance_profile': {'key': 'properties.gpuInstanceProfile', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.kubelet_disk_type = kwargs.get('kubelet_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.pod_subnet_id = kwargs.get('pod_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.os_sku = kwargs.get('os_sku', None) - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.node_public_ip_prefix_id = kwargs.get('node_public_ip_prefix_id', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - self.kubelet_config = kwargs.get('kubelet_config', None) - self.linux_os_config = kwargs.get('linux_os_config', None) - self.enable_encryption_at_host = kwargs.get('enable_encryption_at_host', None) - self.enable_fips = kwargs.get('enable_fips', None) - self.gpu_instance_profile = kwargs.get('gpu_instance_profile', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - self.latest_node_image_version = kwargs.get('latest_node_image_version', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = kwargs.get('max_surge', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2021_03_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2021_03_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2021_03_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2021_03_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(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(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2021_03_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class ExtendedLocation(Model): - """The complex type of the extended location. - - :param name: The name of the extended location. - :type name: str - :param type: The type of the extended location. Possible values include: - 'EdgeZone' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ExtendedLocationTypes - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExtendedLocation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - - -class KubeletConfig(Model): - """Kubelet configurations of agent nodes. - - :param cpu_manager_policy: CPU Manager policy to use. - :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. - :type cpu_cfs_quota: bool - :param cpu_cfs_quota_period: Sets CPU CFS quota period value. - :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. - :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. - :type image_gc_low_threshold: int - :param topology_manager_policy: Topology Manager policy to use. - :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). - :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. - :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. - :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. - :type container_log_max_files: int - :param pod_max_pids: The maximum number of processes per pod. - :type pod_max_pids: int - """ - - _validation = { - 'container_log_max_files': {'minimum': 2}, - } - - _attribute_map = { - 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, - 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, - 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, - 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, - 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, - 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, - 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, - 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, - 'container_log_max_size_mb': {'key': 'containerLogMaxSizeMB', 'type': 'int'}, - 'container_log_max_files': {'key': 'containerLogMaxFiles', 'type': 'int'}, - 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(KubeletConfig, self).__init__(**kwargs) - self.cpu_manager_policy = kwargs.get('cpu_manager_policy', None) - self.cpu_cfs_quota = kwargs.get('cpu_cfs_quota', None) - self.cpu_cfs_quota_period = kwargs.get('cpu_cfs_quota_period', None) - self.image_gc_high_threshold = kwargs.get('image_gc_high_threshold', None) - self.image_gc_low_threshold = kwargs.get('image_gc_low_threshold', None) - self.topology_manager_policy = kwargs.get('topology_manager_policy', None) - self.allowed_unsafe_sysctls = kwargs.get('allowed_unsafe_sysctls', None) - self.fail_swap_on = kwargs.get('fail_swap_on', None) - self.container_log_max_size_mb = kwargs.get('container_log_max_size_mb', None) - self.container_log_max_files = kwargs.get('container_log_max_files', None) - self.pod_max_pids = kwargs.get('pod_max_pids', None) - - -class LinuxOSConfig(Model): - """OS configurations of Linux agent nodes. - - :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2021_03_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. - :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. - :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. - :type swap_file_size_mb: int - """ - - _attribute_map = { - 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, - 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, - 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, - 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(LinuxOSConfig, self).__init__(**kwargs) - self.sysctls = kwargs.get('sysctls', None) - self.transparent_huge_page_enabled = kwargs.get('transparent_huge_page_enabled', None) - self.transparent_huge_page_defrag = kwargs.get('transparent_huge_page_defrag', None) - self.swap_file_size_mb = kwargs.get('swap_file_size_mb', None) - - -class MaintenanceConfiguration(SubResource): - """maintenance configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2021_03_01.models.SystemData - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_03_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_03_01.models.TimeSpan] - """ - - _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'}, - 'time_in_week': {'key': 'properties.timeInWeek', 'type': '[TimeInWeek]'}, - 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, - } - - def __init__(self, **kwargs): - super(MaintenanceConfiguration, self).__init__(**kwargs) - self.system_data = None - self.time_in_week = kwargs.get('time_in_week', None) - self.not_allowed_time = kwargs.get('not_allowed_time', None) - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :param fqdn_subdomain: FQDN subdomain specified when creating private - cluster with custom private dns zone. - :type fqdn_subdomain: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy - config. - :vartype azure_portal_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAddonProfile] - :param pod_identity_profile: Profile of managed cluster pod identity. - :type pod_identity_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAADProfile - :param auto_upgrade_profile: Profile of auto upgrade configuration. - :type auto_upgrade_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param private_link_resources: Private link resources associated with the - cluster. - :type private_link_resources: - list[~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource] - :param disable_local_accounts: If set to true, getting static credential - will be disabled for this cluster. Expected to only be used for AAD - clusters. - :type disable_local_accounts: bool - :param http_proxy_config: Configurations for provisioning the cluster with - HTTP proxy servers. - :type http_proxy_config: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterHTTPProxyConfig - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterSKU - :param extended_location: The extended location of the Virtual Machine. - :type extended_location: - ~azure.mgmt.containerservice.v2021_03_01.models.ExtendedLocation - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - 'azure_portal_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn_subdomain': {'key': 'properties.fqdnSubdomain', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'private_link_resources': {'key': 'properties.privateLinkResources', 'type': '[PrivateLinkResource]'}, - 'disable_local_accounts': {'key': 'properties.disableLocalAccounts', 'type': 'bool'}, - 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'ManagedClusterHTTPProxyConfig'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn_subdomain = kwargs.get('fqdn_subdomain', None) - self.fqdn = None - self.private_fqdn = None - self.azure_portal_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.pod_identity_profile = kwargs.get('pod_identity_profile', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_upgrade_profile = kwargs.get('auto_upgrade_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.private_link_resources = kwargs.get('private_link_resources', None) - self.disable_local_accounts = kwargs.get('disable_local_accounts', None) - self.http_proxy_config = kwargs.get('http_proxy_config', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.extended_location = kwargs.get('extended_location', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = kwargs.get('managed', None) - self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. - :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' - :type os_sku: str or ~azure.mgmt.containerservice.v2021_03_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_03_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param enable_fips: Whether to use FIPS enabled OS - :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' - :type gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.GPUInstanceProfile - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'os_sku': {'key': 'osSKU', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - 'enable_fips': {'key': 'enableFIPS', 'type': 'bool'}, - 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.kubelet_disk_type = kwargs.get('kubelet_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.pod_subnet_id = kwargs.get('pod_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.os_sku = kwargs.get('os_sku', None) - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.node_public_ip_prefix_id = kwargs.get('node_public_ip_prefix_id', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - self.kubelet_config = kwargs.get('kubelet_config', None) - self.linux_os_config = kwargs.get('linux_os_config', None) - self.enable_encryption_at_host = kwargs.get('enable_encryption_at_host', None) - self.enable_fips = kwargs.get('enable_fips', None) - self.gpu_instance_profile = kwargs.get('gpu_instance_profile', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. - :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' - :type os_sku: str or ~azure.mgmt.containerservice.v2021_03_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_03_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param enable_fips: Whether to use FIPS enabled OS - :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' - :type gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.GPUInstanceProfile - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'os_sku': {'key': 'osSKU', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - 'enable_fips': {'key': 'enableFIPS', 'type': 'bool'}, - 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - :param private_dns_zone: Private dns zone mode for private cluster. - :type private_dns_zone: str - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - self.private_dns_zone = kwargs.get('private_dns_zone', None) - - -class ManagedClusterAutoUpgradeProfile(Model): - """Auto upgrade profile for a managed cluster. - - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'node-image', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2021_03_01.models.UpgradeChannel - """ - - _attribute_map = { - 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) - self.upgrade_channel = kwargs.get('upgrade_channel', None) - - -class ManagedClusterHTTPProxyConfig(Model): - """Configurations for provisioning the cluster with HTTP proxy servers. - - :param http_proxy: HTTP proxy server endpoint to use. - :type http_proxy: str - :param https_proxy: HTTPS proxy server endpoint to use. - :type https_proxy: str - :param no_proxy: Endpoints that should not go through proxy. - :type no_proxy: list[str] - :param trusted_ca: Alternative CA cert to use for connecting to proxy - servers. - :type trusted_ca: str - """ - - _attribute_map = { - 'http_proxy': {'key': 'httpProxy', 'type': 'str'}, - 'https_proxy': {'key': 'httpsProxy', 'type': 'str'}, - 'no_proxy': {'key': 'noProxy', 'type': '[str]'}, - 'trusted_ca': {'key': 'trustedCa', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterHTTPProxyConfig, self).__init__(**kwargs) - self.http_proxy = kwargs.get('http_proxy', None) - self.https_proxy = kwargs.get('https_proxy', None) - self.no_proxy = kwargs.get('no_proxy', None) - self.trusted_ca = kwargs.get('trusted_ca', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2021_03_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2021_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2021_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPodIdentity(Model): - """ManagedClusterPodIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity. - :type name: str - :param namespace: Required. Namespace of the pod identity. - :type namespace: str - :param binding_selector: Binding selector to use for the - AzureIdentityBinding resource. - :type binding_selector: str - :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2021_03_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityProvisioningState - :ivar provisioning_info: - :vartype provisioning_info: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityProvisioningInfo - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'identity': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_info': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'binding_selector': {'key': 'bindingSelector', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.binding_selector = kwargs.get('binding_selector', None) - self.identity = kwargs.get('identity', None) - self.provisioning_state = None - self.provisioning_info = None - - -class ManagedClusterPodIdentityException(Model): - """ManagedClusterPodIdentityException. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity exception. - :type name: str - :param namespace: Required. Namespace of the pod identity exception. - :type namespace: str - :param pod_labels: Required. Pod labels to match. - :type pod_labels: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'pod_labels': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.pod_labels = kwargs.get('pod_labels', None) - - -class ManagedClusterPodIdentityProfile(Model): - """ManagedClusterPodIdentityProfile. - - :param enabled: Whether the pod identity addon is enabled. - :type enabled: bool - :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod - identity addon in cluster using Kubenet network plugin. - :type allow_network_plugin_kubenet: bool - :param user_assigned_identities: User assigned pod identity settings. - :type user_assigned_identities: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. - :type user_assigned_identity_exceptions: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityException] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'allow_network_plugin_kubenet': {'key': 'allowNetworkPluginKubenet', 'type': 'bool'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, - 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.allow_network_plugin_kubenet = kwargs.get('allow_network_plugin_kubenet', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - self.user_assigned_identity_exceptions = kwargs.get('user_assigned_identity_exceptions', None) - - -class ManagedClusterPodIdentityProvisioningInfo(Model): - """ManagedClusterPodIdentityProvisioningInfo. - - :param error: Pod identity assignment error (if any). - :type error: ~azure.mgmt.containerservice.v2021_03_01.models.CloudError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudError'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2021_03_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_node_provision_time: - :type max_node_provision_time: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_node_provision_time': {'key': 'max-node-provision-time', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) - self.expander = kwargs.get('expander', None) - self.max_empty_bulk_delete = kwargs.get('max_empty_bulk_delete', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - self.max_node_provision_time = kwargs.get('max_node_provision_time', None) - self.max_total_unready_percentage = kwargs.get('max_total_unready_percentage', None) - self.new_pod_scale_up_delay = kwargs.get('new_pod_scale_up_delay', None) - self.ok_total_unready_count = kwargs.get('ok_total_unready_count', None) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.skip_nodes_with_local_storage = kwargs.get('skip_nodes_with_local_storage', None) - self.skip_nodes_with_system_pods = kwargs.get('skip_nodes_with_system_pods', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.LicenseType - :param enable_csi_proxy: Whether to enable CSI proxy. - :type enable_csi_proxy: bool - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'enable_csi_proxy': {'key': 'enableCSIProxy', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.license_type = kwargs.get('license_type', None) - self.enable_csi_proxy = kwargs.get('enable_csi_proxy', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class OSOptionProfile(Model): - """The OS option profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the OS option profile. - :vartype id: str - :ivar name: Name of the OS option profile. - :vartype name: str - :ivar type: Type of the OS option profile. - :vartype type: str - :param os_option_property_list: Required. The list of OS option - properties. - :type os_option_property_list: - list[~azure.mgmt.containerservice.v2021_03_01.models.OSOptionProperty] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'os_option_property_list': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'os_option_property_list': {'key': 'properties.osOptionPropertyList', 'type': '[OSOptionProperty]'}, - } - - def __init__(self, **kwargs): - super(OSOptionProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.os_option_property_list = kwargs.get('os_option_property_list', None) - - -class OSOptionProperty(Model): - """OS option property. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. OS type. - :type os_type: str - :param enable_fips_image: Required. Whether FIPS image is enabled. - :type enable_fips_image: bool - """ - - _validation = { - 'os_type': {'required': True}, - 'enable_fips_image': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'os-type', 'type': 'str'}, - 'enable_fips_image': {'key': 'enable-fips-image', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(OSOptionProperty, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.enable_fips_image = kwargs.get('enable_fips_image', None) - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2021_03_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PowerState, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.group_id = kwargs.get('group_id', None) - self.required_members = kwargs.get('required_members', None) - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class RunCommandRequest(Model): - """run command request. - - All required parameters must be populated in order to send to Azure. - - :param command: Required. command to run. - :type command: str - :param context: base64 encoded zip file, contains files required by the - command - :type context: str - :param cluster_token: AuthToken issued for AKS AAD Server App. - :type cluster_token: str - """ - - _validation = { - 'command': {'required': True}, - } - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'cluster_token': {'key': 'clusterToken', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandRequest, self).__init__(**kwargs) - self.command = kwargs.get('command', None) - self.context = kwargs.get('context', None) - self.cluster_token = kwargs.get('cluster_token', None) - - -class RunCommandResult(Model): - """run command result. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: command id. - :vartype id: str - :ivar provisioning_state: provisioning State - :vartype provisioning_state: str - :ivar exit_code: exit code of the command - :vartype exit_code: int - :ivar started_at: time when the command started. - :vartype started_at: datetime - :ivar finished_at: time when the command finished. - :vartype finished_at: datetime - :ivar logs: command output. - :vartype logs: str - :ivar reason: explain why provisioningState is set to failed (if so). - :vartype reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'exit_code': {'readonly': True}, - 'started_at': {'readonly': True}, - 'finished_at': {'readonly': True}, - 'logs': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'exit_code': {'key': 'properties.exitCode', 'type': 'int'}, - 'started_at': {'key': 'properties.startedAt', 'type': 'iso-8601'}, - 'finished_at': {'key': 'properties.finishedAt', 'type': 'iso-8601'}, - 'logs': {'key': 'properties.logs', 'type': 'str'}, - 'reason': {'key': 'properties.reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandResult, self).__init__(**kwargs) - self.id = None - self.provisioning_state = None - self.exit_code = None - self.started_at = None - self.finished_at = None - self.logs = None - self.reason = None - - -class SysctlConfig(Model): - """Sysctl settings for Linux agent nodes. - - :param net_core_somaxconn: Sysctl setting net.core.somaxconn. - :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. - :type net_core_netdev_max_backlog: int - :param net_core_rmem_default: Sysctl setting net.core.rmem_default. - :type net_core_rmem_default: int - :param net_core_rmem_max: Sysctl setting net.core.rmem_max. - :type net_core_rmem_max: int - :param net_core_wmem_default: Sysctl setting net.core.wmem_default. - :type net_core_wmem_default: int - :param net_core_wmem_max: Sysctl setting net.core.wmem_max. - :type net_core_wmem_max: int - :param net_core_optmem_max: Sysctl setting net.core.optmem_max. - :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. - :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. - :type net_ipv4_tcp_max_tw_buckets: int - :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. - :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. - :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. - :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. - :type net_ipv4_tcpkeepalive_intvl: int - :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. - :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. - :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. - :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. - :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. - :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. - :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. - :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. - :type fs_inotify_max_user_watches: int - :param fs_file_max: Sysctl setting fs.file-max. - :type fs_file_max: int - :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. - :type fs_aio_max_nr: int - :param fs_nr_open: Sysctl setting fs.nr_open. - :type fs_nr_open: int - :param kernel_threads_max: Sysctl setting kernel.threads-max. - :type kernel_threads_max: int - :param vm_max_map_count: Sysctl setting vm.max_map_count. - :type vm_max_map_count: int - :param vm_swappiness: Sysctl setting vm.swappiness. - :type vm_swappiness: int - :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. - :type vm_vfs_cache_pressure: int - """ - - _attribute_map = { - 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, - 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, - 'net_core_rmem_default': {'key': 'netCoreRmemDefault', 'type': 'int'}, - 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, - 'net_core_wmem_default': {'key': 'netCoreWmemDefault', 'type': 'int'}, - 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, - 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, - 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, - 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, - 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, - 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, - 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, - 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, - 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, - 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, - 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, - 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, - 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, - 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, - 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, - 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, - 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, - 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, - 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SysctlConfig, self).__init__(**kwargs) - self.net_core_somaxconn = kwargs.get('net_core_somaxconn', None) - self.net_core_netdev_max_backlog = kwargs.get('net_core_netdev_max_backlog', None) - self.net_core_rmem_default = kwargs.get('net_core_rmem_default', None) - self.net_core_rmem_max = kwargs.get('net_core_rmem_max', None) - self.net_core_wmem_default = kwargs.get('net_core_wmem_default', None) - self.net_core_wmem_max = kwargs.get('net_core_wmem_max', None) - self.net_core_optmem_max = kwargs.get('net_core_optmem_max', None) - self.net_ipv4_tcp_max_syn_backlog = kwargs.get('net_ipv4_tcp_max_syn_backlog', None) - self.net_ipv4_tcp_max_tw_buckets = kwargs.get('net_ipv4_tcp_max_tw_buckets', None) - self.net_ipv4_tcp_fin_timeout = kwargs.get('net_ipv4_tcp_fin_timeout', None) - self.net_ipv4_tcp_keepalive_time = kwargs.get('net_ipv4_tcp_keepalive_time', None) - self.net_ipv4_tcp_keepalive_probes = kwargs.get('net_ipv4_tcp_keepalive_probes', None) - self.net_ipv4_tcpkeepalive_intvl = kwargs.get('net_ipv4_tcpkeepalive_intvl', None) - self.net_ipv4_tcp_tw_reuse = kwargs.get('net_ipv4_tcp_tw_reuse', None) - self.net_ipv4_ip_local_port_range = kwargs.get('net_ipv4_ip_local_port_range', None) - self.net_ipv4_neigh_default_gc_thresh1 = kwargs.get('net_ipv4_neigh_default_gc_thresh1', None) - self.net_ipv4_neigh_default_gc_thresh2 = kwargs.get('net_ipv4_neigh_default_gc_thresh2', None) - self.net_ipv4_neigh_default_gc_thresh3 = kwargs.get('net_ipv4_neigh_default_gc_thresh3', None) - self.net_netfilter_nf_conntrack_max = kwargs.get('net_netfilter_nf_conntrack_max', None) - self.net_netfilter_nf_conntrack_buckets = kwargs.get('net_netfilter_nf_conntrack_buckets', None) - self.fs_inotify_max_user_watches = kwargs.get('fs_inotify_max_user_watches', None) - self.fs_file_max = kwargs.get('fs_file_max', None) - self.fs_aio_max_nr = kwargs.get('fs_aio_max_nr', None) - self.fs_nr_open = kwargs.get('fs_nr_open', None) - self.kernel_threads_max = kwargs.get('kernel_threads_max', None) - self.vm_max_map_count = kwargs.get('vm_max_map_count', None) - self.vm_swappiness = kwargs.get('vm_swappiness', None) - self.vm_vfs_cache_pressure = kwargs.get('vm_vfs_cache_pressure', None) - - -class SystemData(Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' - :type last_modified_by_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: 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): - 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) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - - -class TimeInWeek(Model): - """Time in a week. - - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - :type day: str or ~azure.mgmt.containerservice.v2021_03_01.models.WeekDay - :param hour_slots: hour slots in a day. - :type hour_slots: list[int] - """ - - _attribute_map = { - 'day': {'key': 'day', 'type': 'str'}, - 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, - } - - def __init__(self, **kwargs): - super(TimeInWeek, self).__init__(**kwargs) - self.day = kwargs.get('day', None) - self.hour_slots = kwargs.get('hour_slots', None) - - -class TimeSpan(Model): - """The time span with start and end properties. - - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime - """ - - _attribute_map = { - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(TimeSpan, self).__init__(**kwargs) - self.start = kwargs.get('start', None) - self.end = kwargs.get('end', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_models_py3.py deleted file mode 100644 index 7a3f7e34645..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_models_py3.py +++ /dev/null @@ -1,3212 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. - :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' - :type os_sku: str or ~azure.mgmt.containerservice.v2021_03_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_03_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param enable_fips: Whether to use FIPS enabled OS - :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' - :type gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.GPUInstanceProfile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'properties.kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'os_sku': {'key': 'properties.osSKU', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'properties.nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'properties.enableEncryptionAtHost', 'type': 'bool'}, - 'enable_fips': {'key': 'properties.enableFIPS', 'type': 'bool'}, - 'gpu_instance_profile': {'key': 'properties.gpuInstanceProfile', 'type': 'str'}, - } - - def __init__(self, *, count: int=None, vm_size: str=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", os_sku=None, max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, enable_fips: bool=None, gpu_instance_profile=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.kubelet_disk_type = kubelet_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.pod_subnet_id = pod_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.os_sku = os_sku - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.node_public_ip_prefix_id = node_public_ip_prefix_id - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - self.kubelet_config = kubelet_config - self.linux_os_config = linux_os_config - self.enable_encryption_at_host = enable_encryption_at_host - self.enable_fips = enable_fips - self.gpu_instance_profile = gpu_instance_profile - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - self.latest_node_image_version = latest_node_image_version - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, *, max_surge: str=None, **kwargs) -> None: - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = max_surge - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2021_03_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2021_03_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2021_03_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2021_03_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(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) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2021_03_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class ExtendedLocation(Model): - """The complex type of the extended location. - - :param name: The name of the extended location. - :type name: str - :param type: The type of the extended location. Possible values include: - 'EdgeZone' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ExtendedLocationTypes - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, type=None, **kwargs) -> None: - super(ExtendedLocation, self).__init__(**kwargs) - self.name = name - self.type = type - - -class KubeletConfig(Model): - """Kubelet configurations of agent nodes. - - :param cpu_manager_policy: CPU Manager policy to use. - :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. - :type cpu_cfs_quota: bool - :param cpu_cfs_quota_period: Sets CPU CFS quota period value. - :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. - :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. - :type image_gc_low_threshold: int - :param topology_manager_policy: Topology Manager policy to use. - :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). - :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. - :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. - :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. - :type container_log_max_files: int - :param pod_max_pids: The maximum number of processes per pod. - :type pod_max_pids: int - """ - - _validation = { - 'container_log_max_files': {'minimum': 2}, - } - - _attribute_map = { - 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, - 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, - 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, - 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, - 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, - 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, - 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, - 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, - 'container_log_max_size_mb': {'key': 'containerLogMaxSizeMB', 'type': 'int'}, - 'container_log_max_files': {'key': 'containerLogMaxFiles', 'type': 'int'}, - 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, - } - - def __init__(self, *, cpu_manager_policy: str=None, cpu_cfs_quota: bool=None, cpu_cfs_quota_period: str=None, image_gc_high_threshold: int=None, image_gc_low_threshold: int=None, topology_manager_policy: str=None, allowed_unsafe_sysctls=None, fail_swap_on: bool=None, container_log_max_size_mb: int=None, container_log_max_files: int=None, pod_max_pids: int=None, **kwargs) -> None: - super(KubeletConfig, self).__init__(**kwargs) - self.cpu_manager_policy = cpu_manager_policy - self.cpu_cfs_quota = cpu_cfs_quota - self.cpu_cfs_quota_period = cpu_cfs_quota_period - self.image_gc_high_threshold = image_gc_high_threshold - self.image_gc_low_threshold = image_gc_low_threshold - self.topology_manager_policy = topology_manager_policy - self.allowed_unsafe_sysctls = allowed_unsafe_sysctls - self.fail_swap_on = fail_swap_on - self.container_log_max_size_mb = container_log_max_size_mb - self.container_log_max_files = container_log_max_files - self.pod_max_pids = pod_max_pids - - -class LinuxOSConfig(Model): - """OS configurations of Linux agent nodes. - - :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2021_03_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. - :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. - :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. - :type swap_file_size_mb: int - """ - - _attribute_map = { - 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, - 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, - 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, - 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, - } - - def __init__(self, *, sysctls=None, transparent_huge_page_enabled: str=None, transparent_huge_page_defrag: str=None, swap_file_size_mb: int=None, **kwargs) -> None: - super(LinuxOSConfig, self).__init__(**kwargs) - self.sysctls = sysctls - self.transparent_huge_page_enabled = transparent_huge_page_enabled - self.transparent_huge_page_defrag = transparent_huge_page_defrag - self.swap_file_size_mb = swap_file_size_mb - - -class MaintenanceConfiguration(SubResource): - """maintenance configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2021_03_01.models.SystemData - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_03_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_03_01.models.TimeSpan] - """ - - _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'}, - 'time_in_week': {'key': 'properties.timeInWeek', 'type': '[TimeInWeek]'}, - 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, - } - - def __init__(self, *, time_in_week=None, not_allowed_time=None, **kwargs) -> None: - super(MaintenanceConfiguration, self).__init__(**kwargs) - self.system_data = None - self.time_in_week = time_in_week - self.not_allowed_time = not_allowed_time - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :param fqdn_subdomain: FQDN subdomain specified when creating private - cluster with custom private dns zone. - :type fqdn_subdomain: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy - config. - :vartype azure_portal_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAddonProfile] - :param pod_identity_profile: Profile of managed cluster pod identity. - :type pod_identity_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAADProfile - :param auto_upgrade_profile: Profile of auto upgrade configuration. - :type auto_upgrade_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param private_link_resources: Private link resources associated with the - cluster. - :type private_link_resources: - list[~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource] - :param disable_local_accounts: If set to true, getting static credential - will be disabled for this cluster. Expected to only be used for AAD - clusters. - :type disable_local_accounts: bool - :param http_proxy_config: Configurations for provisioning the cluster with - HTTP proxy servers. - :type http_proxy_config: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterHTTPProxyConfig - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterSKU - :param extended_location: The extended location of the Virtual Machine. - :type extended_location: - ~azure.mgmt.containerservice.v2021_03_01.models.ExtendedLocation - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - 'azure_portal_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn_subdomain': {'key': 'properties.fqdnSubdomain', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'private_link_resources': {'key': 'properties.privateLinkResources', 'type': '[PrivateLinkResource]'}, - 'disable_local_accounts': {'key': 'properties.disableLocalAccounts', 'type': 'bool'}, - 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'ManagedClusterHTTPProxyConfig'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, fqdn_subdomain: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, pod_identity_profile=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_upgrade_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, private_link_resources=None, disable_local_accounts: bool=None, http_proxy_config=None, identity=None, sku=None, extended_location=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn_subdomain = fqdn_subdomain - self.fqdn = None - self.private_fqdn = None - self.azure_portal_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.pod_identity_profile = pod_identity_profile - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_upgrade_profile = auto_upgrade_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.private_link_resources = private_link_resources - self.disable_local_accounts = disable_local_accounts - self.http_proxy_config = http_proxy_config - self.identity = identity - self.sku = sku - self.extended_location = extended_location - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = managed - self.enable_azure_rbac = enable_azure_rbac - self.admin_group_object_ids = admin_group_object_ids - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. - :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' - :type os_sku: str or ~azure.mgmt.containerservice.v2021_03_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_03_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param enable_fips: Whether to use FIPS enabled OS - :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' - :type gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.GPUInstanceProfile - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'os_sku': {'key': 'osSKU', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - 'enable_fips': {'key': 'enableFIPS', 'type': 'bool'}, - 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, - } - - def __init__(self, *, count: int=None, vm_size: str=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", os_sku=None, max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, enable_fips: bool=None, gpu_instance_profile=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.kubelet_disk_type = kubelet_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.pod_subnet_id = pod_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.os_sku = os_sku - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.node_public_ip_prefix_id = node_public_ip_prefix_id - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - self.kubelet_config = kubelet_config - self.linux_os_config = linux_os_config - self.enable_encryption_at_host = enable_encryption_at_host - self.enable_fips = enable_fips - self.gpu_instance_profile = gpu_instance_profile - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. - :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' - :type os_sku: str or ~azure.mgmt.containerservice.v2021_03_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_03_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param enable_fips: Whether to use FIPS enabled OS - :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' - :type gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.GPUInstanceProfile - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'os_sku': {'key': 'osSKU', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - 'enable_fips': {'key': 'enableFIPS', 'type': 'bool'}, - 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, count: int=None, vm_size: str=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", os_sku=None, max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, enable_fips: bool=None, gpu_instance_profile=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, os_disk_type=os_disk_type, kubelet_disk_type=kubelet_disk_type, vnet_subnet_id=vnet_subnet_id, pod_subnet_id=pod_subnet_id, max_pods=max_pods, os_type=os_type, os_sku=os_sku, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, node_public_ip_prefix_id=node_public_ip_prefix_id, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, kubelet_config=kubelet_config, linux_os_config=linux_os_config, enable_encryption_at_host=enable_encryption_at_host, enable_fips=enable_fips, gpu_instance_profile=gpu_instance_profile, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - :param private_dns_zone: Private dns zone mode for private cluster. - :type private_dns_zone: str - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, private_dns_zone: str=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - self.private_dns_zone = private_dns_zone - - -class ManagedClusterAutoUpgradeProfile(Model): - """Auto upgrade profile for a managed cluster. - - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'node-image', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2021_03_01.models.UpgradeChannel - """ - - _attribute_map = { - 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, - } - - def __init__(self, *, upgrade_channel=None, **kwargs) -> None: - super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) - self.upgrade_channel = upgrade_channel - - -class ManagedClusterHTTPProxyConfig(Model): - """Configurations for provisioning the cluster with HTTP proxy servers. - - :param http_proxy: HTTP proxy server endpoint to use. - :type http_proxy: str - :param https_proxy: HTTPS proxy server endpoint to use. - :type https_proxy: str - :param no_proxy: Endpoints that should not go through proxy. - :type no_proxy: list[str] - :param trusted_ca: Alternative CA cert to use for connecting to proxy - servers. - :type trusted_ca: str - """ - - _attribute_map = { - 'http_proxy': {'key': 'httpProxy', 'type': 'str'}, - 'https_proxy': {'key': 'httpsProxy', 'type': 'str'}, - 'no_proxy': {'key': 'noProxy', 'type': '[str]'}, - 'trusted_ca': {'key': 'trustedCa', 'type': 'str'}, - } - - def __init__(self, *, http_proxy: str=None, https_proxy: str=None, no_proxy=None, trusted_ca: str=None, **kwargs) -> None: - super(ManagedClusterHTTPProxyConfig, self).__init__(**kwargs) - self.http_proxy = http_proxy - self.https_proxy = https_proxy - self.no_proxy = no_proxy - self.trusted_ca = trusted_ca - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2021_03_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2021_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2021_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPodIdentity(Model): - """ManagedClusterPodIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity. - :type name: str - :param namespace: Required. Namespace of the pod identity. - :type namespace: str - :param binding_selector: Binding selector to use for the - AzureIdentityBinding resource. - :type binding_selector: str - :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2021_03_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityProvisioningState - :ivar provisioning_info: - :vartype provisioning_info: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityProvisioningInfo - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'identity': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_info': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'binding_selector': {'key': 'bindingSelector', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, - } - - def __init__(self, *, name: str, namespace: str, identity, binding_selector: str=None, **kwargs) -> None: - super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = name - self.namespace = namespace - self.binding_selector = binding_selector - self.identity = identity - self.provisioning_state = None - self.provisioning_info = None - - -class ManagedClusterPodIdentityException(Model): - """ManagedClusterPodIdentityException. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity exception. - :type name: str - :param namespace: Required. Namespace of the pod identity exception. - :type namespace: str - :param pod_labels: Required. Pod labels to match. - :type pod_labels: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'pod_labels': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, - } - - def __init__(self, *, name: str, namespace: str, pod_labels, **kwargs) -> None: - super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = name - self.namespace = namespace - self.pod_labels = pod_labels - - -class ManagedClusterPodIdentityProfile(Model): - """ManagedClusterPodIdentityProfile. - - :param enabled: Whether the pod identity addon is enabled. - :type enabled: bool - :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod - identity addon in cluster using Kubenet network plugin. - :type allow_network_plugin_kubenet: bool - :param user_assigned_identities: User assigned pod identity settings. - :type user_assigned_identities: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. - :type user_assigned_identity_exceptions: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityException] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'allow_network_plugin_kubenet': {'key': 'allowNetworkPluginKubenet', 'type': 'bool'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, - 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, - } - - def __init__(self, *, enabled: bool=None, allow_network_plugin_kubenet: bool=None, user_assigned_identities=None, user_assigned_identity_exceptions=None, **kwargs) -> None: - super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) - self.enabled = enabled - self.allow_network_plugin_kubenet = allow_network_plugin_kubenet - self.user_assigned_identities = user_assigned_identities - self.user_assigned_identity_exceptions = user_assigned_identity_exceptions - - -class ManagedClusterPodIdentityProvisioningInfo(Model): - """ManagedClusterPodIdentityProvisioningInfo. - - :param error: Pod identity assignment error (if any). - :type error: ~azure.mgmt.containerservice.v2021_03_01.models.CloudError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudError'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) - self.error = error - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2021_03_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_node_provision_time: - :type max_node_provision_time: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_node_provision_time': {'key': 'max-node-provision-time', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_empty_bulk_delete: str=None, max_graceful_termination_sec: str=None, max_node_provision_time: str=None, max_total_unready_percentage: str=None, new_pod_scale_up_delay: str=None, ok_total_unready_count: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, skip_nodes_with_local_storage: str=None, skip_nodes_with_system_pods: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = balance_similar_node_groups - self.expander = expander - self.max_empty_bulk_delete = max_empty_bulk_delete - self.max_graceful_termination_sec = max_graceful_termination_sec - self.max_node_provision_time = max_node_provision_time - self.max_total_unready_percentage = max_total_unready_percentage - self.new_pod_scale_up_delay = new_pod_scale_up_delay - self.ok_total_unready_count = ok_total_unready_count - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.skip_nodes_with_local_storage = skip_nodes_with_local_storage - self.skip_nodes_with_system_pods = skip_nodes_with_system_pods - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, tier=None, **kwargs) -> None: - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.LicenseType - :param enable_csi_proxy: Whether to enable CSI proxy. - :type enable_csi_proxy: bool - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'enable_csi_proxy': {'key': 'enableCSIProxy', 'type': 'bool'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, license_type=None, enable_csi_proxy: bool=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - self.license_type = license_type - self.enable_csi_proxy = enable_csi_proxy - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class OSOptionProfile(Model): - """The OS option profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the OS option profile. - :vartype id: str - :ivar name: Name of the OS option profile. - :vartype name: str - :ivar type: Type of the OS option profile. - :vartype type: str - :param os_option_property_list: Required. The list of OS option - properties. - :type os_option_property_list: - list[~azure.mgmt.containerservice.v2021_03_01.models.OSOptionProperty] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'os_option_property_list': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'os_option_property_list': {'key': 'properties.osOptionPropertyList', 'type': '[OSOptionProperty]'}, - } - - def __init__(self, *, os_option_property_list, **kwargs) -> None: - super(OSOptionProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.os_option_property_list = os_option_property_list - - -class OSOptionProperty(Model): - """OS option property. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. OS type. - :type os_type: str - :param enable_fips_image: Required. Whether FIPS image is enabled. - :type enable_fips_image: bool - """ - - _validation = { - 'os_type': {'required': True}, - 'enable_fips_image': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'os-type', 'type': 'str'}, - 'enable_fips_image': {'key': 'enable-fips-image', 'type': 'bool'}, - } - - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs) -> None: - super(OSOptionProperty, self).__init__(**kwargs) - self.os_type = os_type - self.enable_fips_image = enable_fips_image - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2021_03_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, *, code=None, **kwargs) -> None: - super(PowerState, self).__init__(**kwargs) - self.code = code - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = id - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: str=None, required_members=None, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.group_id = group_id - self.required_members = required_members - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class RunCommandRequest(Model): - """run command request. - - All required parameters must be populated in order to send to Azure. - - :param command: Required. command to run. - :type command: str - :param context: base64 encoded zip file, contains files required by the - command - :type context: str - :param cluster_token: AuthToken issued for AKS AAD Server App. - :type cluster_token: str - """ - - _validation = { - 'command': {'required': True}, - } - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'cluster_token': {'key': 'clusterToken', 'type': 'str'}, - } - - def __init__(self, *, command: str, context: str=None, cluster_token: str=None, **kwargs) -> None: - super(RunCommandRequest, self).__init__(**kwargs) - self.command = command - self.context = context - self.cluster_token = cluster_token - - -class RunCommandResult(Model): - """run command result. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: command id. - :vartype id: str - :ivar provisioning_state: provisioning State - :vartype provisioning_state: str - :ivar exit_code: exit code of the command - :vartype exit_code: int - :ivar started_at: time when the command started. - :vartype started_at: datetime - :ivar finished_at: time when the command finished. - :vartype finished_at: datetime - :ivar logs: command output. - :vartype logs: str - :ivar reason: explain why provisioningState is set to failed (if so). - :vartype reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'exit_code': {'readonly': True}, - 'started_at': {'readonly': True}, - 'finished_at': {'readonly': True}, - 'logs': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'exit_code': {'key': 'properties.exitCode', 'type': 'int'}, - 'started_at': {'key': 'properties.startedAt', 'type': 'iso-8601'}, - 'finished_at': {'key': 'properties.finishedAt', 'type': 'iso-8601'}, - 'logs': {'key': 'properties.logs', 'type': 'str'}, - 'reason': {'key': 'properties.reason', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RunCommandResult, self).__init__(**kwargs) - self.id = None - self.provisioning_state = None - self.exit_code = None - self.started_at = None - self.finished_at = None - self.logs = None - self.reason = None - - -class SysctlConfig(Model): - """Sysctl settings for Linux agent nodes. - - :param net_core_somaxconn: Sysctl setting net.core.somaxconn. - :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. - :type net_core_netdev_max_backlog: int - :param net_core_rmem_default: Sysctl setting net.core.rmem_default. - :type net_core_rmem_default: int - :param net_core_rmem_max: Sysctl setting net.core.rmem_max. - :type net_core_rmem_max: int - :param net_core_wmem_default: Sysctl setting net.core.wmem_default. - :type net_core_wmem_default: int - :param net_core_wmem_max: Sysctl setting net.core.wmem_max. - :type net_core_wmem_max: int - :param net_core_optmem_max: Sysctl setting net.core.optmem_max. - :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. - :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. - :type net_ipv4_tcp_max_tw_buckets: int - :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. - :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. - :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. - :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. - :type net_ipv4_tcpkeepalive_intvl: int - :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. - :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. - :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. - :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. - :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. - :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. - :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. - :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. - :type fs_inotify_max_user_watches: int - :param fs_file_max: Sysctl setting fs.file-max. - :type fs_file_max: int - :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. - :type fs_aio_max_nr: int - :param fs_nr_open: Sysctl setting fs.nr_open. - :type fs_nr_open: int - :param kernel_threads_max: Sysctl setting kernel.threads-max. - :type kernel_threads_max: int - :param vm_max_map_count: Sysctl setting vm.max_map_count. - :type vm_max_map_count: int - :param vm_swappiness: Sysctl setting vm.swappiness. - :type vm_swappiness: int - :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. - :type vm_vfs_cache_pressure: int - """ - - _attribute_map = { - 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, - 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, - 'net_core_rmem_default': {'key': 'netCoreRmemDefault', 'type': 'int'}, - 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, - 'net_core_wmem_default': {'key': 'netCoreWmemDefault', 'type': 'int'}, - 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, - 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, - 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, - 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, - 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, - 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, - 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, - 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, - 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, - 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, - 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, - 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, - 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, - 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, - 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, - 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, - 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, - 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, - 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, - } - - def __init__(self, *, net_core_somaxconn: int=None, net_core_netdev_max_backlog: int=None, net_core_rmem_default: int=None, net_core_rmem_max: int=None, net_core_wmem_default: int=None, net_core_wmem_max: int=None, net_core_optmem_max: int=None, net_ipv4_tcp_max_syn_backlog: int=None, net_ipv4_tcp_max_tw_buckets: int=None, net_ipv4_tcp_fin_timeout: int=None, net_ipv4_tcp_keepalive_time: int=None, net_ipv4_tcp_keepalive_probes: int=None, net_ipv4_tcpkeepalive_intvl: int=None, net_ipv4_tcp_tw_reuse: bool=None, net_ipv4_ip_local_port_range: str=None, net_ipv4_neigh_default_gc_thresh1: int=None, net_ipv4_neigh_default_gc_thresh2: int=None, net_ipv4_neigh_default_gc_thresh3: int=None, net_netfilter_nf_conntrack_max: int=None, net_netfilter_nf_conntrack_buckets: int=None, fs_inotify_max_user_watches: int=None, fs_file_max: int=None, fs_aio_max_nr: int=None, fs_nr_open: int=None, kernel_threads_max: int=None, vm_max_map_count: int=None, vm_swappiness: int=None, vm_vfs_cache_pressure: int=None, **kwargs) -> None: - super(SysctlConfig, self).__init__(**kwargs) - self.net_core_somaxconn = net_core_somaxconn - self.net_core_netdev_max_backlog = net_core_netdev_max_backlog - self.net_core_rmem_default = net_core_rmem_default - self.net_core_rmem_max = net_core_rmem_max - self.net_core_wmem_default = net_core_wmem_default - self.net_core_wmem_max = net_core_wmem_max - self.net_core_optmem_max = net_core_optmem_max - self.net_ipv4_tcp_max_syn_backlog = net_ipv4_tcp_max_syn_backlog - self.net_ipv4_tcp_max_tw_buckets = net_ipv4_tcp_max_tw_buckets - self.net_ipv4_tcp_fin_timeout = net_ipv4_tcp_fin_timeout - self.net_ipv4_tcp_keepalive_time = net_ipv4_tcp_keepalive_time - self.net_ipv4_tcp_keepalive_probes = net_ipv4_tcp_keepalive_probes - self.net_ipv4_tcpkeepalive_intvl = net_ipv4_tcpkeepalive_intvl - self.net_ipv4_tcp_tw_reuse = net_ipv4_tcp_tw_reuse - self.net_ipv4_ip_local_port_range = net_ipv4_ip_local_port_range - self.net_ipv4_neigh_default_gc_thresh1 = net_ipv4_neigh_default_gc_thresh1 - self.net_ipv4_neigh_default_gc_thresh2 = net_ipv4_neigh_default_gc_thresh2 - self.net_ipv4_neigh_default_gc_thresh3 = net_ipv4_neigh_default_gc_thresh3 - self.net_netfilter_nf_conntrack_max = net_netfilter_nf_conntrack_max - self.net_netfilter_nf_conntrack_buckets = net_netfilter_nf_conntrack_buckets - self.fs_inotify_max_user_watches = fs_inotify_max_user_watches - self.fs_file_max = fs_file_max - self.fs_aio_max_nr = fs_aio_max_nr - self.fs_nr_open = fs_nr_open - self.kernel_threads_max = kernel_threads_max - self.vm_max_map_count = vm_max_map_count - self.vm_swappiness = vm_swappiness - self.vm_vfs_cache_pressure = vm_vfs_cache_pressure - - -class SystemData(Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' - :type last_modified_by_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: 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: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: - 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 - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags - - -class TimeInWeek(Model): - """Time in a week. - - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - :type day: str or ~azure.mgmt.containerservice.v2021_03_01.models.WeekDay - :param hour_slots: hour slots in a day. - :type hour_slots: list[int] - """ - - _attribute_map = { - 'day': {'key': 'day', 'type': 'str'}, - 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, - } - - def __init__(self, *, day=None, hour_slots=None, **kwargs) -> None: - super(TimeInWeek, self).__init__(**kwargs) - self.day = day - self.hour_slots = hour_slots - - -class TimeSpan(Model): - """The time span with start and end properties. - - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime - """ - - _attribute_map = { - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - } - - def __init__(self, *, start=None, end=None, **kwargs) -> None: - super(TimeSpan, self).__init__(**kwargs) - self.start = start - self.end = end diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_paged_models.py deleted file mode 100644 index f923a1981eb..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_paged_models.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class MaintenanceConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`MaintenanceConfiguration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MaintenanceConfiguration]'} - } - - def __init__(self, *args, **kwargs): - - super(MaintenanceConfigurationPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_agent_pools_operations.py deleted file mode 100644 index 968f00fc4cd..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,610 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2021_03_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2021_03_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_03_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_03_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} - - - def _upgrade_node_image_version_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.upgrade_node_image_version.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 202: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def upgrade_node_image_version( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrade node image version of an agent pool to the latest. - - Upgrade node image version of an agent pool to the latest. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_03_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_03_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._upgrade_node_image_version_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_maintenance_configurations_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_maintenance_configurations_operations.py deleted file mode 100644 index 48f470ac8a6..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_maintenance_configurations_operations.py +++ /dev/null @@ -1,387 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class MaintenanceConfigurationsOperations(object): - """MaintenanceConfigurationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01" - - self.config = config - - def list_by_managed_cluster( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of maintenance configurations in the specified managed - cluster. - - Gets a list of maintenance configurations in the specified managed - cluster. The operation returns properties of each maintenance - configuration. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of MaintenanceConfiguration - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.MaintenanceConfigurationPaged[~azure.mgmt.containerservice.v2021_03_01.models.MaintenanceConfiguration] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_managed_cluster.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.MaintenanceConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} - - def get( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): - """Gets the maintenance configuration. - - Gets the details of maintenance configurations by managed cluster and - resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MaintenanceConfiguration or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.MaintenanceConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, **operation_config): - parameters = models.MaintenanceConfiguration(time_in_week=time_in_week, not_allowed_time=not_allowed_time) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a maintenance configurations. - - Creates or updates a maintenance configuration in the specified managed - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_03_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_03_01.models.TimeSpan] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - MaintenanceConfiguration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_03_01.models.MaintenanceConfiguration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_03_01.models.MaintenanceConfiguration]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - time_in_week=time_in_week, - not_allowed_time=not_allowed_time, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a maintenance configuration. - - Deletes the maintenance configuration in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_managed_clusters_operations.py deleted file mode 100644 index cf7bc5784f7..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1539 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01" - - self.config = config - - def get_os_options( - self, location, resource_type=None, custom_headers=None, raw=False, **operation_config): - """Gets supported OS options in the specified subscription. - - Gets supported OS options in the specified subscription. - - :param location: The name of a supported Azure region. - :type location: str - :param resource_type: resource type for which the OS options needs to - be returned - :type resource_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OSOptionProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.OSOptionProfile or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_os_options.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if resource_type is not None: - query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('OSOptionProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_os_options.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} - - - def _stop_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stop Managed Cluster. - - Stops a Running Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} - - - def _start_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Start Managed Cluster. - - Starts a Stopped Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} - - - def _run_command_initial( - self, resource_group_name, resource_name, request_payload, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.run_command.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request_payload, 'RunCommandRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def run_command( - self, resource_group_name, resource_name, request_payload, custom_headers=None, raw=False, polling=True, **operation_config): - """Run Command against Managed Kubernetes Service. - - Submit a command to run against managed kubernetes service, it will - create a pod to run the command. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param request_payload: Parameters supplied to the RunCommand - operation. - :type request_payload: - ~azure.mgmt.containerservice.v2021_03_01.models.RunCommandRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_03_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_03_01.models.RunCommandResult]] - :raises: :class:`CloudError` - """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - request_payload=request_payload, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} - - def get_command_result( - self, resource_group_name, resource_name, command_id, custom_headers=None, raw=False, **operation_config): - """Get command result. - - Get command result from previous runCommand invoke. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param command_id: Id of the command request. - :type command_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RunCommandResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.RunCommandResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_command_result.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'commandId': self._serialize.url("command_id", command_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_command_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_operations.py deleted file mode 100644 index e2784d91191..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2021_03_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index f219423e72f..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,348 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private endpoint connections in the specified managed - cluster. - - Gets a list of private endpoint connections in the specified managed - cluster. The operation returns properties of each private endpoint - connection. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnectionListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} - - def get( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """Gets the private endpoint connection. - - Gets the details of the private endpoint connection by managed cluster - and resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def update( - self, resource_group_name, resource_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): - """Updates a private endpoint connection. - - Updates a private endpoint connection in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a private endpoint connection. - - Deletes the private endpoint connection in the specified managed - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_private_link_resources_operations.py deleted file mode 100644 index e5e5dbfc1bb..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class PrivateLinkResourcesOperations(object): - """PrivateLinkResourcesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private link resources in the specified managed cluster. - - Gets a list of private link resources in the specified managed cluster. - The operation returns properties of each private link resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResourcesListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_resolve_private_link_service_id_operations.py deleted file mode 100644 index 37503ef6ba1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_resolve_private_link_service_id_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ResolvePrivateLinkServiceIdOperations(object): - """ResolvePrivateLinkServiceIdOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01" - - self.config = config - - def post( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - """Gets the private link service ID for the specified managed cluster. - - Gets the private link service ID the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters (name, groupId) supplied in order to - resolve a private link service ID. - :type parameters: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.post.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateLinkResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/version.py deleted file mode 100644 index f25a2116ec1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2021-03-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/__init__.py old mode 100644 new mode 100755 index b7cb9d01cb1..eb3d7ba7a26 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/__init__.py @@ -1,19 +1,16 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._configuration import ContainerServiceClientConfiguration from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION +__all__ = ['ContainerServiceClient'] +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_configuration.py old mode 100644 new mode 100755 index e94fbc7005d..9a90721ebc2 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_configuration.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_configuration.py @@ -1,50 +1,70 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration -from .version import VERSION +from typing import TYPE_CHECKING +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient Note that all parameters used to create this instance are saved as instance attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str - :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials + self.credential = credential self.subscription_id = subscription_id + self.api_version = "2021-05-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_container_service_client.py old mode 100644 new mode 100755 index 19799dc92a8..c6f8ea5a9a8 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_container_service_client.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_container_service_client.py @@ -1,16 +1,22 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import ContainerServiceClientConfiguration from .operations import Operations @@ -23,59 +29,91 @@ from . import models -class ContainerServiceClient(SDKClient): +class ContainerServiceClient(object): """The Container Service Client. - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - :ivar operations: Operations operations :vartype operations: azure.mgmt.containerservice.v2021_05_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations + :ivar managed_clusters: ManagedClustersOperations operations :vartype managed_clusters: azure.mgmt.containerservice.v2021_05_01.operations.ManagedClustersOperations - :ivar maintenance_configurations: MaintenanceConfigurations operations + :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations :vartype maintenance_configurations: azure.mgmt.containerservice.v2021_05_01.operations.MaintenanceConfigurationsOperations - :ivar agent_pools: AgentPools operations + :ivar agent_pools: AgentPoolsOperations operations :vartype agent_pools: azure.mgmt.containerservice.v2021_05_01.operations.AgentPoolsOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.containerservice.v2021_05_01.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations + :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.containerservice.v2021_05_01.operations.PrivateLinkResourcesOperations - :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceId operations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2021_05_01.operations.ResolvePrivateLinkServiceIdOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2021-05-01' self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.maintenance_configurations = MaintenanceConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> ContainerServiceClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/__init__.py old mode 100644 new mode 100755 similarity index 73% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/version.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/__init__.py index 391827c689e..4ad2bb20096 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/version.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/__init__.py @@ -1,13 +1,10 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2018-08-01-preview" - +from ._container_service_client import ContainerServiceClient +__all__ = ['ContainerServiceClient'] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/_configuration.py new file mode 100755 index 00000000000..de11b983ca1 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/_configuration.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-05-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/_container_service_client.py new file mode 100755 index 00000000000..6134e940c07 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/_container_service_client.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import ContainerServiceClientConfiguration +from .operations import Operations +from .operations import ManagedClustersOperations +from .operations import MaintenanceConfigurationsOperations +from .operations import AgentPoolsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import ResolvePrivateLinkServiceIdOperations +from .. import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2021_05_01.aio.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: azure.mgmt.containerservice.v2021_05_01.aio.operations.ManagedClustersOperations + :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations + :vartype maintenance_configurations: azure.mgmt.containerservice.v2021_05_01.aio.operations.MaintenanceConfigurationsOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: azure.mgmt.containerservice.v2021_05_01.aio.operations.AgentPoolsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.containerservice.v2021_05_01.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.containerservice.v2021_05_01.aio.operations.PrivateLinkResourcesOperations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations + :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2021_05_01.aio.operations.ResolvePrivateLinkServiceIdOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.maintenance_configurations = MaintenanceConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.agent_pools = AgentPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ContainerServiceClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/__init__.py old mode 100644 new mode 100755 similarity index 95% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/__init__.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/__init__.py index d7bfa3f00fe..3942e0ca6a0 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/__init__.py @@ -1,12 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._operations import Operations diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_agent_pools_operations.py new file mode 100755 index 00000000000..0509972712f --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_agent_pools_operations.py @@ -0,0 +1,689 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AgentPoolsOperations: + """AgentPoolsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AgentPoolListResult"]: + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. The operation returns properties + of each agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> "_models.AgentPool": + """Gets the agent pool. + + Gets the details of the agent pool by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", + **kwargs: Any + ) -> "_models.AgentPool": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AgentPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", + **kwargs: Any + ) -> AsyncLROPoller["_models.AgentPool"]: + """Creates or updates an agent pool. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :param parameters: Parameters supplied to the Create or Update an agent pool operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an agent pool. + + Deletes the agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def get_upgrade_profile( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> "_models.AgentPoolUpgradeProfile": + """Gets upgrade profile for an agent pool. + + Gets the details of the upgrade profile for an agent pool with a specified resource group and + managed cluster name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPoolUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} # type: ignore + + async def get_available_agent_pool_versions( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.AgentPoolAvailableVersions": + """Gets a list of supported versions for the specified agent pool. + + Gets a list of supported versions for the specified agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolAvailableVersions, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolAvailableVersions + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolAvailableVersions"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_available_agent_pool_versions.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPoolAvailableVersions', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} # type: ignore + + async def _upgrade_node_image_version_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> Optional["_models.AgentPool"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AgentPool"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._upgrade_node_image_version_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _upgrade_node_image_version_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore + + async def begin_upgrade_node_image_version( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.AgentPool"]: + """Upgrade node image version of an agent pool to the latest. + + Upgrade node image version of an agent pool to the latest. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_maintenance_configurations_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_maintenance_configurations_operations.py new file mode 100755 index 00000000000..b10621f7b93 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_maintenance_configurations_operations.py @@ -0,0 +1,317 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MaintenanceConfigurationsOperations: + """MaintenanceConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_managed_cluster( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.MaintenanceConfigurationListResult"]: + """Gets a list of maintenance configurations in the specified managed cluster. + + Gets a list of maintenance configurations in the specified managed cluster. The operation + returns properties of each maintenance configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MaintenanceConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_managed_cluster.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('MaintenanceConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + **kwargs: Any + ) -> "_models.MaintenanceConfiguration": + """Gets the maintenance configuration. + + Gets the details of maintenance configurations by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: "_models.MaintenanceConfiguration", + **kwargs: Any + ) -> "_models.MaintenanceConfiguration": + """Creates or updates a maintenance configurations. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :param parameters: Parameters supplied to the Create or Update a default maintenance + configuration. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + **kwargs: Any + ) -> None: + """Deletes a maintenance configuration. + + Deletes the maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_managed_clusters_operations.py new file mode 100755 index 00000000000..4fc5b8a6549 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_managed_clusters_operations.py @@ -0,0 +1,1844 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ManagedClustersOperations: + """ManagedClustersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get_os_options( + self, + location: str, + resource_type: Optional[str] = None, + **kwargs: Any + ) -> "_models.OSOptionProfile": + """Gets supported OS options in the specified subscription. + + Gets supported OS options in the specified subscription. + + :param location: The name of a supported Azure region. + :type location: str + :param resource_type: resource type for which the OS options needs to be returned. + :type resource_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OSOptionProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.OSOptionProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OSOptionProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_os_options.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if resource_type is not None: + query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OSOptionProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_os_options.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default'} # type: ignore + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. The operation returns properties + of each managed cluster. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. The operation returns + properties of each managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + async def get_upgrade_profile( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.ManagedClusterUpgradeProfile": + """Gets upgrade profile for a managed cluster. + + Gets the details of the upgrade profile for a managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore + + async def get_access_profile( + self, + resource_group_name: str, + resource_name: str, + role_name: str, + **kwargs: Any + ) -> "_models.ManagedClusterAccessProfile": + """Gets an access profile of a managed cluster. + + Gets the accessProfile for the specified role name of the managed cluster with a specified + resource group and name. **WARNING**\ : This API will be deprecated. Instead use + `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_access_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore + + async def list_cluster_admin_credentials( + self, + resource_group_name: str, + resource_name: str, + server_fqdn: Optional[str] = None, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster admin credential of a managed cluster. + + Gets cluster admin credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. + :type server_fqdn: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore + + async def list_cluster_user_credentials( + self, + resource_group_name: str, + resource_name: str, + server_fqdn: Optional[str] = None, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster user credential of a managed cluster. + + Gets cluster user credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. + :type server_fqdn: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore + + async def list_cluster_monitoring_user_credentials( + self, + resource_group_name: str, + resource_name: str, + server_fqdn: Optional[str] = None, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster monitoring user credential of a managed cluster. + + Gets cluster monitoring user credential of the managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. + :type server_fqdn: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_monitoring_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.ManagedCluster": + """Gets a managed cluster. + + Gets the details of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedCluster", + **kwargs: Any + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedCluster", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_tags_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Updates tags on a managed cluster. + + Updates a managed cluster with the specified tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a managed cluster. + + Deletes the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _reset_service_principal_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + async def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset Service Principal Profile of a managed cluster. + + Update the service principal Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a + Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterServicePrincipalProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_service_principal_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + async def _reset_aad_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + async def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset AAD Profile of a managed cluster. + + Update the AAD Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed + Cluster. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + async def _rotate_cluster_certificates_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._rotate_cluster_certificates_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _rotate_cluster_certificates_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + async def begin_rotate_cluster_certificates( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Rotate certificates of a managed cluster. + + Rotate certificates of a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._rotate_cluster_certificates_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + async def _stop_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._stop_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore + + async def begin_stop( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Stop Managed Cluster. + + Stops a Running Managed Cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore + + async def _start_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._start_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore + + async def begin_start( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Start Managed Cluster. + + Starts a Stopped Managed Cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore + + async def _run_command_initial( + self, + resource_group_name: str, + resource_name: str, + request_payload: "_models.RunCommandRequest", + **kwargs: Any + ) -> Optional["_models.RunCommandResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.RunCommandResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._run_command_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request_payload, 'RunCommandRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _run_command_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} # type: ignore + + async def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: "_models.RunCommandRequest", + **kwargs: Any + ) -> AsyncLROPoller["_models.RunCommandResult"]: + """Run Command against Managed Kubernetes Service. + + Submit a command to run against managed kubernetes service, it will create a pod to run the + command. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param request_payload: Parameters supplied to the RunCommand operation. + :type request_payload: ~azure.mgmt.containerservice.v2021_05_01.models.RunCommandRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RunCommandResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2021_05_01.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RunCommandResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._run_command_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + request_payload=request_payload, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RunCommandResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} # type: ignore + + async def get_command_result( + self, + resource_group_name: str, + resource_name: str, + command_id: str, + **kwargs: Any + ) -> Optional["_models.RunCommandResult"]: + """Get command result. + + Get command result from previous runCommand invoke. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param command_id: Id of the command request. + :type command_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RunCommandResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.RunCommandResult or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.RunCommandResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_command_result.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'commandId': self._serialize.url("command_id", command_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_command_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'} # type: ignore + + def list_outbound_network_dependencies_endpoints( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.OutboundEnvironmentEndpointCollection"]: + """Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. + + Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + specified managed cluster. The operation returns properties of each egress endpoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OutboundEnvironmentEndpointCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.OutboundEnvironmentEndpointCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_outbound_network_dependencies_endpoints.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OutboundEnvironmentEndpointCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_operations.py new file mode 100755 index 00000000000..5bb49c542c2 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationListResult"]: + """Gets a list of compute operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_private_endpoint_connections_operations.py new file mode 100755 index 00000000000..5881a84458d --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,357 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnectionListResult": + """Gets a list of private endpoint connections in the specified managed cluster. + + Gets a list of private endpoint connections in the specified managed cluster. The operation + returns properties of each private endpoint connection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnectionListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Gets the private endpoint connection. + + Gets the details of the private endpoint connection by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Updates a private endpoint connection. + + Updates a private endpoint connection in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: Parameters supplied to the Update a private endpoint connection operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a private endpoint connection. + + Deletes the private endpoint connection in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_private_link_resources_operations.py new file mode 100755 index 00000000000..dd9f79796f6 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.PrivateLinkResourcesListResult": + """Gets a list of private link resources in the specified managed cluster. + + Gets a list of private link resources in the specified managed cluster. The operation returns + properties of each private link resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_resolve_private_link_service_id_operations.py new file mode 100755 index 00000000000..930df4ecfc5 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ResolvePrivateLinkServiceIdOperations: + """ResolvePrivateLinkServiceIdOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.PrivateLinkResource", + **kwargs: Any + ) -> "_models.PrivateLinkResource": + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters (name, groupId) supplied in order to resolve a private link + service ID. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.post.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateLinkResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/__init__.py old mode 100644 new mode 100755 index f8893541ba3..5ef1b816ad0 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/__init__.py @@ -1,21 +1,24 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- try: from ._models_py3 import AgentPool from ._models_py3 import AgentPoolAvailableVersions from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem + from ._models_py3 import AgentPoolListResult from ._models_py3 import AgentPoolUpgradeProfile from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem from ._models_py3 import AgentPoolUpgradeSettings + from ._models_py3 import CloudError + from ._models_py3 import CloudErrorBody + from ._models_py3 import Components1Q1Og48SchemasManagedclusterAllof1 + from ._models_py3 import Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties + from ._models_py3 import ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties from ._models_py3 import ContainerServiceDiagnosticsProfile from ._models_py3 import ContainerServiceLinuxProfile from ._models_py3 import ContainerServiceMasterProfile @@ -31,18 +34,19 @@ from ._models_py3 import KubeletConfig from ._models_py3 import LinuxOSConfig from ._models_py3 import MaintenanceConfiguration + from ._models_py3 import MaintenanceConfigurationListResult from ._models_py3 import ManagedCluster from ._models_py3 import ManagedClusterAADProfile + from ._models_py3 import ManagedClusterAPIServerAccessProfile from ._models_py3 import ManagedClusterAccessProfile from ._models_py3 import ManagedClusterAddonProfile from ._models_py3 import ManagedClusterAddonProfileIdentity from ._models_py3 import ManagedClusterAgentPoolProfile from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile from ._models_py3 import ManagedClusterAutoUpgradeProfile from ._models_py3 import ManagedClusterHTTPProxyConfig from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue + from ._models_py3 import ManagedClusterListResult from ._models_py3 import ManagedClusterLoadBalancerProfile from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes @@ -54,15 +58,16 @@ from ._models_py3 import ManagedClusterPoolUpgradeProfile from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile from ._models_py3 import ManagedClusterSKU + from ._models_py3 import ManagedClusterServicePrincipalProfile from ._models_py3 import ManagedClusterUpgradeProfile from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue from ._models_py3 import OSOptionProfile from ._models_py3 import OSOptionProperty + from ._models_py3 import OperationListResult + from ._models_py3 import OperationValue from ._models_py3 import OutboundEnvironmentEndpoint + from ._models_py3 import OutboundEnvironmentEndpointCollection from ._models_py3 import PowerState from ._models_py3 import PrivateEndpoint from ._models_py3 import PrivateEndpointConnection @@ -82,121 +87,132 @@ from ._models_py3 import TimeSpan from ._models_py3 import UserAssignedIdentity except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import EndpointDependency - from ._models import EndpointDetail - from ._models import ExtendedLocation - from ._models import KubeletConfig - from ._models import LinuxOSConfig - from ._models import MaintenanceConfiguration - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterAutoUpgradeProfile - from ._models import ManagedClusterHTTPProxyConfig - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPodIdentity - from ._models import ManagedClusterPodIdentityException - from ._models import ManagedClusterPodIdentityProfile - from ._models import ManagedClusterPodIdentityProvisioningInfo - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import OSOptionProfile - from ._models import OSOptionProperty - from ._models import OutboundEnvironmentEndpoint - from ._models import PowerState - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointConnectionListResult - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourcesListResult - from ._models import PrivateLinkServiceConnectionState - from ._models import Resource - from ._models import ResourceReference - from ._models import RunCommandRequest - from ._models import RunCommandResult - from ._models import SubResource - from ._models import SysctlConfig - from ._models import SystemData - from ._models import TagsObject - from ._models import TimeInWeek - from ._models import TimeSpan - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import MaintenanceConfigurationPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._paged_models import OutboundEnvironmentEndpointPaged + from ._models import AgentPool # type: ignore + from ._models import AgentPoolAvailableVersions # type: ignore + from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem # type: ignore + from ._models import AgentPoolListResult # type: ignore + from ._models import AgentPoolUpgradeProfile # type: ignore + from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem # type: ignore + from ._models import AgentPoolUpgradeSettings # type: ignore + from ._models import CloudError # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import Components1Q1Og48SchemasManagedclusterAllof1 # type: ignore + from ._models import Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties # type: ignore + from ._models import ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties # type: ignore + from ._models import ContainerServiceDiagnosticsProfile # type: ignore + from ._models import ContainerServiceLinuxProfile # type: ignore + from ._models import ContainerServiceMasterProfile # type: ignore + from ._models import ContainerServiceNetworkProfile # type: ignore + from ._models import ContainerServiceSshConfiguration # type: ignore + from ._models import ContainerServiceSshPublicKey # type: ignore + from ._models import ContainerServiceVMDiagnostics # type: ignore + from ._models import CredentialResult # type: ignore + from ._models import CredentialResults # type: ignore + from ._models import EndpointDependency # type: ignore + from ._models import EndpointDetail # type: ignore + from ._models import ExtendedLocation # type: ignore + from ._models import KubeletConfig # type: ignore + from ._models import LinuxOSConfig # type: ignore + from ._models import MaintenanceConfiguration # type: ignore + from ._models import MaintenanceConfigurationListResult # type: ignore + from ._models import ManagedCluster # type: ignore + from ._models import ManagedClusterAADProfile # type: ignore + from ._models import ManagedClusterAPIServerAccessProfile # type: ignore + from ._models import ManagedClusterAccessProfile # type: ignore + from ._models import ManagedClusterAddonProfile # type: ignore + from ._models import ManagedClusterAddonProfileIdentity # type: ignore + from ._models import ManagedClusterAgentPoolProfile # type: ignore + from ._models import ManagedClusterAgentPoolProfileProperties # type: ignore + from ._models import ManagedClusterAutoUpgradeProfile # type: ignore + from ._models import ManagedClusterHTTPProxyConfig # type: ignore + from ._models import ManagedClusterIdentity # type: ignore + from ._models import ManagedClusterListResult # type: ignore + from ._models import ManagedClusterLoadBalancerProfile # type: ignore + from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs # type: ignore + from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes # type: ignore + from ._models import ManagedClusterLoadBalancerProfileOutboundIPs # type: ignore + from ._models import ManagedClusterPodIdentity # type: ignore + from ._models import ManagedClusterPodIdentityException # type: ignore + from ._models import ManagedClusterPodIdentityProfile # type: ignore + from ._models import ManagedClusterPodIdentityProvisioningInfo # type: ignore + from ._models import ManagedClusterPoolUpgradeProfile # type: ignore + from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem # type: ignore + from ._models import ManagedClusterPropertiesAutoScalerProfile # type: ignore + from ._models import ManagedClusterSKU # type: ignore + from ._models import ManagedClusterServicePrincipalProfile # type: ignore + from ._models import ManagedClusterUpgradeProfile # type: ignore + from ._models import ManagedClusterWindowsProfile # type: ignore + from ._models import OSOptionProfile # type: ignore + from ._models import OSOptionProperty # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import OperationValue # type: ignore + from ._models import OutboundEnvironmentEndpoint # type: ignore + from ._models import OutboundEnvironmentEndpointCollection # type: ignore + from ._models import PowerState # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourcesListResult # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceReference # type: ignore + from ._models import RunCommandRequest # type: ignore + from ._models import RunCommandResult # type: ignore + from ._models import SubResource # type: ignore + from ._models import SysctlConfig # type: ignore + from ._models import SystemData # type: ignore + from ._models import TagsObject # type: ignore + from ._models import TimeInWeek # type: ignore + from ._models import TimeSpan # type: ignore + from ._models import UserAssignedIdentity # type: ignore + from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSDiskType, - KubeletDiskType, - OSType, - OSSKU, - AgentPoolType, AgentPoolMode, + AgentPoolType, Code, - ScaleSetPriority, - ScaleSetEvictionPolicy, + ConnectionStatus, + ContainerServiceStorageProfileTypes, + ContainerServiceVMSizeTypes, + Count, + CreatedByType, + Expander, + ExtendedLocationTypes, GPUInstanceProfile, + KubeletDiskType, LicenseType, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, LoadBalancerSku, - CreatedByType, - WeekDay, ManagedClusterPodIdentityProvisioningState, - UpgradeChannel, - Expander, - ResourceIdentityType, ManagedClusterSKUName, ManagedClusterSKUTier, - ExtendedLocationTypes, + NetworkMode, + NetworkPlugin, + NetworkPolicy, + OSDiskType, + OSSKU, + OSType, + OutboundType, PrivateEndpointConnectionProvisioningState, - ConnectionStatus, + ResourceIdentityType, + ScaleSetEvictionPolicy, + ScaleSetPriority, + UpgradeChannel, + WeekDay, ) __all__ = [ 'AgentPool', 'AgentPoolAvailableVersions', 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', + 'AgentPoolListResult', 'AgentPoolUpgradeProfile', 'AgentPoolUpgradeProfilePropertiesUpgradesItem', 'AgentPoolUpgradeSettings', + 'CloudError', + 'CloudErrorBody', + 'Components1Q1Og48SchemasManagedclusterAllof1', + 'Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties', + 'ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties', 'ContainerServiceDiagnosticsProfile', 'ContainerServiceLinuxProfile', 'ContainerServiceMasterProfile', @@ -212,18 +228,19 @@ 'KubeletConfig', 'LinuxOSConfig', 'MaintenanceConfiguration', + 'MaintenanceConfigurationListResult', 'ManagedCluster', 'ManagedClusterAADProfile', + 'ManagedClusterAPIServerAccessProfile', 'ManagedClusterAccessProfile', 'ManagedClusterAddonProfile', 'ManagedClusterAddonProfileIdentity', 'ManagedClusterAgentPoolProfile', 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', 'ManagedClusterAutoUpgradeProfile', 'ManagedClusterHTTPProxyConfig', 'ManagedClusterIdentity', - 'ManagedClusterIdentityUserAssignedIdentitiesValue', + 'ManagedClusterListResult', 'ManagedClusterLoadBalancerProfile', 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', @@ -235,15 +252,16 @@ 'ManagedClusterPoolUpgradeProfile', 'ManagedClusterPoolUpgradeProfileUpgradesItem', 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', 'ManagedClusterSKU', + 'ManagedClusterServicePrincipalProfile', 'ManagedClusterUpgradeProfile', 'ManagedClusterWindowsProfile', - 'OperationValue', 'OSOptionProfile', 'OSOptionProperty', + 'OperationListResult', + 'OperationValue', 'OutboundEnvironmentEndpoint', + 'OutboundEnvironmentEndpointCollection', 'PowerState', 'PrivateEndpoint', 'PrivateEndpointConnection', @@ -262,38 +280,34 @@ 'TimeInWeek', 'TimeSpan', 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'OutboundEnvironmentEndpointPaged', - 'MaintenanceConfigurationPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSDiskType', - 'KubeletDiskType', - 'OSType', - 'OSSKU', - 'AgentPoolType', 'AgentPoolMode', + 'AgentPoolType', 'Code', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', + 'ConnectionStatus', + 'ContainerServiceStorageProfileTypes', + 'ContainerServiceVMSizeTypes', + 'Count', + 'CreatedByType', + 'Expander', + 'ExtendedLocationTypes', 'GPUInstanceProfile', + 'KubeletDiskType', 'LicenseType', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', 'LoadBalancerSku', - 'CreatedByType', - 'WeekDay', 'ManagedClusterPodIdentityProvisioningState', - 'UpgradeChannel', - 'Expander', - 'ResourceIdentityType', 'ManagedClusterSKUName', 'ManagedClusterSKUTier', - 'ExtendedLocationTypes', + 'NetworkMode', + 'NetworkPlugin', + 'NetworkPolicy', + 'OSDiskType', + 'OSSKU', + 'OSType', + 'OutboundType', 'PrivateEndpointConnectionProvisioningState', - 'ConnectionStatus', + 'ResourceIdentityType', + 'ScaleSetEvictionPolicy', + 'ScaleSetPriority', + 'UpgradeChannel', + 'WeekDay', ] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_container_service_client_enums.py old mode 100644 new mode 100755 index 07d226f1f08..bdf1668dad1 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_container_service_client_enums.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_container_service_client_enums.py @@ -1,378 +1,438 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AgentPoolMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """AgentPoolMode represents mode of an agent pool. + """ + + SYSTEM = "System" + USER = "User" + +class AgentPoolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """AgentPoolType represents types of an agent pool. + """ + + VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" + AVAILABILITY_SET = "AvailabilitySet" + +class Code(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tells whether the cluster is Running or Stopped + """ + + RUNNING = "Running" + STOPPED = "Stopped" + +class ConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The private link service connection status. + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + +class ContainerServiceStorageProfileTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Storage profile specifies what kind of storage used. Choose from StorageAccount and + ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. + """ + + STORAGE_ACCOUNT = "StorageAccount" + MANAGED_DISKS = "ManagedDisks" + +class ContainerServiceVMSizeTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Size of agent VMs. + """ + + STANDARD_A1 = "Standard_A1" + STANDARD_A10 = "Standard_A10" + STANDARD_A11 = "Standard_A11" + STANDARD_A1_V2 = "Standard_A1_v2" + STANDARD_A2 = "Standard_A2" + STANDARD_A2_V2 = "Standard_A2_v2" + STANDARD_A2_M_V2 = "Standard_A2m_v2" + STANDARD_A3 = "Standard_A3" + STANDARD_A4 = "Standard_A4" + STANDARD_A4_V2 = "Standard_A4_v2" + STANDARD_A4_M_V2 = "Standard_A4m_v2" + STANDARD_A5 = "Standard_A5" + STANDARD_A6 = "Standard_A6" + STANDARD_A7 = "Standard_A7" + STANDARD_A8 = "Standard_A8" + STANDARD_A8_V2 = "Standard_A8_v2" + STANDARD_A8_M_V2 = "Standard_A8m_v2" + STANDARD_A9 = "Standard_A9" + STANDARD_B2_MS = "Standard_B2ms" + STANDARD_B2_S = "Standard_B2s" + STANDARD_B4_MS = "Standard_B4ms" + STANDARD_B8_MS = "Standard_B8ms" + STANDARD_D1 = "Standard_D1" + STANDARD_D11 = "Standard_D11" + STANDARD_D11_V2 = "Standard_D11_v2" + STANDARD_D11_V2_PROMO = "Standard_D11_v2_Promo" + STANDARD_D12 = "Standard_D12" + STANDARD_D12_V2 = "Standard_D12_v2" + STANDARD_D12_V2_PROMO = "Standard_D12_v2_Promo" + STANDARD_D13 = "Standard_D13" + STANDARD_D13_V2 = "Standard_D13_v2" + STANDARD_D13_V2_PROMO = "Standard_D13_v2_Promo" + STANDARD_D14 = "Standard_D14" + STANDARD_D14_V2 = "Standard_D14_v2" + STANDARD_D14_V2_PROMO = "Standard_D14_v2_Promo" + STANDARD_D15_V2 = "Standard_D15_v2" + STANDARD_D16_V3 = "Standard_D16_v3" + STANDARD_D16_S_V3 = "Standard_D16s_v3" + STANDARD_D1_V2 = "Standard_D1_v2" + STANDARD_D2 = "Standard_D2" + STANDARD_D2_V2 = "Standard_D2_v2" + STANDARD_D2_V2_PROMO = "Standard_D2_v2_Promo" + STANDARD_D2_V3 = "Standard_D2_v3" + STANDARD_D2_S_V3 = "Standard_D2s_v3" + STANDARD_D3 = "Standard_D3" + STANDARD_D32_V3 = "Standard_D32_v3" + STANDARD_D32_S_V3 = "Standard_D32s_v3" + STANDARD_D3_V2 = "Standard_D3_v2" + STANDARD_D3_V2_PROMO = "Standard_D3_v2_Promo" + STANDARD_D4 = "Standard_D4" + STANDARD_D4_V2 = "Standard_D4_v2" + STANDARD_D4_V2_PROMO = "Standard_D4_v2_Promo" + STANDARD_D4_V3 = "Standard_D4_v3" + STANDARD_D4_S_V3 = "Standard_D4s_v3" + STANDARD_D5_V2 = "Standard_D5_v2" + STANDARD_D5_V2_PROMO = "Standard_D5_v2_Promo" + STANDARD_D64_V3 = "Standard_D64_v3" + STANDARD_D64_S_V3 = "Standard_D64s_v3" + STANDARD_D8_V3 = "Standard_D8_v3" + STANDARD_D8_S_V3 = "Standard_D8s_v3" + STANDARD_DS1 = "Standard_DS1" + STANDARD_DS11 = "Standard_DS11" + STANDARD_DS11_V2 = "Standard_DS11_v2" + STANDARD_DS11_V2_PROMO = "Standard_DS11_v2_Promo" + STANDARD_DS12 = "Standard_DS12" + STANDARD_DS12_V2 = "Standard_DS12_v2" + STANDARD_DS12_V2_PROMO = "Standard_DS12_v2_Promo" + STANDARD_DS13 = "Standard_DS13" + STANDARD_DS13_2_V2 = "Standard_DS13-2_v2" + STANDARD_DS13_4_V2 = "Standard_DS13-4_v2" + STANDARD_DS13_V2 = "Standard_DS13_v2" + STANDARD_DS13_V2_PROMO = "Standard_DS13_v2_Promo" + STANDARD_DS14 = "Standard_DS14" + STANDARD_DS14_4_V2 = "Standard_DS14-4_v2" + STANDARD_DS14_8_V2 = "Standard_DS14-8_v2" + STANDARD_DS14_V2 = "Standard_DS14_v2" + STANDARD_DS14_V2_PROMO = "Standard_DS14_v2_Promo" + STANDARD_DS15_V2 = "Standard_DS15_v2" + STANDARD_DS1_V2 = "Standard_DS1_v2" + STANDARD_DS2 = "Standard_DS2" + STANDARD_DS2_V2 = "Standard_DS2_v2" + STANDARD_DS2_V2_PROMO = "Standard_DS2_v2_Promo" + STANDARD_DS3 = "Standard_DS3" + STANDARD_DS3_V2 = "Standard_DS3_v2" + STANDARD_DS3_V2_PROMO = "Standard_DS3_v2_Promo" + STANDARD_DS4 = "Standard_DS4" + STANDARD_DS4_V2 = "Standard_DS4_v2" + STANDARD_DS4_V2_PROMO = "Standard_DS4_v2_Promo" + STANDARD_DS5_V2 = "Standard_DS5_v2" + STANDARD_DS5_V2_PROMO = "Standard_DS5_v2_Promo" + STANDARD_E16_V3 = "Standard_E16_v3" + STANDARD_E16_S_V3 = "Standard_E16s_v3" + STANDARD_E2_V3 = "Standard_E2_v3" + STANDARD_E2_S_V3 = "Standard_E2s_v3" + STANDARD_E32_16_S_V3 = "Standard_E32-16s_v3" + STANDARD_E32_8_S_V3 = "Standard_E32-8s_v3" + STANDARD_E32_V3 = "Standard_E32_v3" + STANDARD_E32_S_V3 = "Standard_E32s_v3" + STANDARD_E4_V3 = "Standard_E4_v3" + STANDARD_E4_S_V3 = "Standard_E4s_v3" + STANDARD_E64_16_S_V3 = "Standard_E64-16s_v3" + STANDARD_E64_32_S_V3 = "Standard_E64-32s_v3" + STANDARD_E64_V3 = "Standard_E64_v3" + STANDARD_E64_S_V3 = "Standard_E64s_v3" + STANDARD_E8_V3 = "Standard_E8_v3" + STANDARD_E8_S_V3 = "Standard_E8s_v3" + STANDARD_F1 = "Standard_F1" + STANDARD_F16 = "Standard_F16" + STANDARD_F16_S = "Standard_F16s" + STANDARD_F16_S_V2 = "Standard_F16s_v2" + STANDARD_F1_S = "Standard_F1s" + STANDARD_F2 = "Standard_F2" + STANDARD_F2_S = "Standard_F2s" + STANDARD_F2_S_V2 = "Standard_F2s_v2" + STANDARD_F32_S_V2 = "Standard_F32s_v2" + STANDARD_F4 = "Standard_F4" + STANDARD_F4_S = "Standard_F4s" + STANDARD_F4_S_V2 = "Standard_F4s_v2" + STANDARD_F64_S_V2 = "Standard_F64s_v2" + STANDARD_F72_S_V2 = "Standard_F72s_v2" + STANDARD_F8 = "Standard_F8" + STANDARD_F8_S = "Standard_F8s" + STANDARD_F8_S_V2 = "Standard_F8s_v2" + STANDARD_G1 = "Standard_G1" + STANDARD_G2 = "Standard_G2" + STANDARD_G3 = "Standard_G3" + STANDARD_G4 = "Standard_G4" + STANDARD_G5 = "Standard_G5" + STANDARD_GS1 = "Standard_GS1" + STANDARD_GS2 = "Standard_GS2" + STANDARD_GS3 = "Standard_GS3" + STANDARD_GS4 = "Standard_GS4" + STANDARD_GS4_4 = "Standard_GS4-4" + STANDARD_GS4_8 = "Standard_GS4-8" + STANDARD_GS5 = "Standard_GS5" + STANDARD_GS5_16 = "Standard_GS5-16" + STANDARD_GS5_8 = "Standard_GS5-8" + STANDARD_H16 = "Standard_H16" + STANDARD_H16_M = "Standard_H16m" + STANDARD_H16_MR = "Standard_H16mr" + STANDARD_H16_R = "Standard_H16r" + STANDARD_H8 = "Standard_H8" + STANDARD_H8_M = "Standard_H8m" + STANDARD_L16_S = "Standard_L16s" + STANDARD_L32_S = "Standard_L32s" + STANDARD_L4_S = "Standard_L4s" + STANDARD_L8_S = "Standard_L8s" + STANDARD_M128_32_MS = "Standard_M128-32ms" + STANDARD_M128_64_MS = "Standard_M128-64ms" + STANDARD_M128_MS = "Standard_M128ms" + STANDARD_M128_S = "Standard_M128s" + STANDARD_M64_16_MS = "Standard_M64-16ms" + STANDARD_M64_32_MS = "Standard_M64-32ms" + STANDARD_M64_MS = "Standard_M64ms" + STANDARD_M64_S = "Standard_M64s" + STANDARD_NC12 = "Standard_NC12" + STANDARD_NC12_S_V2 = "Standard_NC12s_v2" + STANDARD_NC12_S_V3 = "Standard_NC12s_v3" + STANDARD_NC24 = "Standard_NC24" + STANDARD_NC24_R = "Standard_NC24r" + STANDARD_NC24_RS_V2 = "Standard_NC24rs_v2" + STANDARD_NC24_RS_V3 = "Standard_NC24rs_v3" + STANDARD_NC24_S_V2 = "Standard_NC24s_v2" + STANDARD_NC24_S_V3 = "Standard_NC24s_v3" + STANDARD_NC6 = "Standard_NC6" + STANDARD_NC6_S_V2 = "Standard_NC6s_v2" + STANDARD_NC6_S_V3 = "Standard_NC6s_v3" + STANDARD_ND12_S = "Standard_ND12s" + STANDARD_ND24_RS = "Standard_ND24rs" + STANDARD_ND24_S = "Standard_ND24s" + STANDARD_ND6_S = "Standard_ND6s" + STANDARD_NV12 = "Standard_NV12" + STANDARD_NV24 = "Standard_NV24" + STANDARD_NV6 = "Standard_NV6" + +class Count(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): + """Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The + default value is 1. + """ + + ONE = 1 + THREE = 3 + FIVE = 5 + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class Expander(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + LEAST_WASTE = "least-waste" + MOST_PODS = "most-pods" + PRIORITY = "priority" + RANDOM = "random" + +class ExtendedLocationTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of extendedLocation. + """ + + EDGE_ZONE = "EdgeZone" + +class GPUInstanceProfile(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. + """ + + MIG1_G = "MIG1g" + MIG2_G = "MIG2g" + MIG3_G = "MIG3g" + MIG4_G = "MIG4g" + MIG7_G = "MIG7g" + +class KubeletDiskType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """KubeletDiskType determines the placement of emptyDir volumes, container runtime data root, and + Kubelet ephemeral storage. Allowed values: 'OS', 'Temporary' (preview). + """ + + OS = "OS" + TEMPORARY = "Temporary" + +class LicenseType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User + Benefits for Windows VMs. + """ + + NONE = "None" + WINDOWS_SERVER = "Windows_Server" + +class LoadBalancerSku(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The load balancer sku for the managed cluster. + """ + + STANDARD = "standard" + BASIC = "basic" + +class ManagedClusterPodIdentityProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state of the pod identity. + """ + + ASSIGNED = "Assigned" + UPDATING = "Updating" + DELETING = "Deleting" + FAILED = "Failed" + +class ManagedClusterSKUName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of a managed cluster SKU. + """ + + BASIC = "Basic" + +class ManagedClusterSKUTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tier of a managed cluster SKU. + """ + + PAID = "Paid" + FREE = "Free" + +class NetworkMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network mode used for building Kubernetes network. + """ + + TRANSPARENT = "transparent" + BRIDGE = "bridge" + +class NetworkPlugin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network plugin used for building Kubernetes network. + """ + + AZURE = "azure" + KUBENET = "kubenet" + +class NetworkPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network policy used for building Kubernetes network. + """ + CALICO = "calico" + AZURE = "azure" -class OSDiskType(str, Enum): +class OSDiskType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OSDiskType represents the type of an OS disk on an agent pool. + """ - managed = "Managed" - ephemeral = "Ephemeral" + MANAGED = "Managed" + EPHEMERAL = "Ephemeral" +class OSSKU(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner for Linux + OSType. Not applicable to Windows OSType. + """ -class KubeletDiskType(str, Enum): + UBUNTU = "Ubuntu" + CBL_MARINER = "CBLMariner" - os = "OS" - temporary = "Temporary" +class OSType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + """ + LINUX = "Linux" + WINDOWS = "Windows" + +class OutboundType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The outbound (egress) routing method. + """ + + LOAD_BALANCER = "loadBalancer" + USER_DEFINED_ROUTING = "userDefinedRouting" + +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ -class OSType(str, Enum): + SUCCEEDED = "Succeeded" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" - linux = "Linux" - windows = "Windows" +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly + created identity in master components and an auto-created user assigned identity in MC_ + resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, service + principal will be used instead. + """ + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + NONE = "None" -class OSSKU(str, Enum): +class ScaleSetEvictionPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale + set. Default to Delete. + """ - ubuntu = "Ubuntu" - cbl_mariner = "CBLMariner" + DELETE = "Delete" + DEALLOCATE = "Deallocate" +class ScaleSetPriority(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. + """ -class AgentPoolType(str, Enum): + SPOT = "Spot" + REGULAR = "Regular" - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" +class UpgradeChannel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """upgrade channel for auto upgrade. + """ - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class Code(str, Enum): - - running = "Running" - stopped = "Stopped" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class GPUInstanceProfile(str, Enum): - - mig1g = "MIG1g" - mig2g = "MIG2g" - mig3g = "MIG3g" - mig4g = "MIG4g" - mig7g = "MIG7g" - - -class LicenseType(str, Enum): - - none = "None" - windows_server = "Windows_Server" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class CreatedByType(str, Enum): - - user = "User" - application = "Application" - managed_identity = "ManagedIdentity" - key = "Key" - - -class WeekDay(str, Enum): - - sunday = "Sunday" - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" - - -class ManagedClusterPodIdentityProvisioningState(str, Enum): - - assigned = "Assigned" - updating = "Updating" - deleting = "Deleting" - failed = "Failed" - - -class UpgradeChannel(str, Enum): - - rapid = "rapid" - stable = "stable" - patch = "patch" - node_image = "node-image" - none = "none" - - -class Expander(str, Enum): - - least_waste = "least-waste" - most_pods = "most-pods" - priority = "priority" - random = "random" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" - - -class ExtendedLocationTypes(str, Enum): - - edge_zone = "EdgeZone" - - -class PrivateEndpointConnectionProvisioningState(str, Enum): - - succeeded = "Succeeded" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" + RAPID = "rapid" + STABLE = "stable" + PATCH = "patch" + NODE_IMAGE = "node-image" + NONE = "none" + +class WeekDay(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The weekday enum. + """ + + SUNDAY = "Sunday" + MONDAY = "Monday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + THURSDAY = "Thursday" + FRIDAY = "Friday" + SATURDAY = "Saturday" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models.py old mode 100644 new mode 100755 index fb6135bb98b..0df038e3e8e --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models.py @@ -1,30 +1,25 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError +import msrest.serialization -class SubResource(Model): +class SubResource(msrest.serialization.Model): """Reference to another subresource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str """ @@ -40,7 +35,10 @@ class SubResource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SubResource, self).__init__(**kwargs) self.id = None self.name = None @@ -50,139 +48,120 @@ def __init__(self, **kwargs): class AgentPool(SubResource): """Agent Pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 1000 (inclusive) for user pools and in - the range of 1 to 1000 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. :type count: int :param vm_size: Size of agent VMs. :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param os_sku: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner + for Linux OSType. Not applicable to Windows OSType. Possible values include: "Ubuntu", + "CBLMariner". :type os_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or + :param type_properties_type: AgentPoolType represents types of an agent pool. Possible values + include: "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. + :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs assigned from this + Public IP Prefix. :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param enable_ultra_ssd: Whether to enable UltraSSD + :param enable_ultra_ssd: Whether to enable UltraSSD. :type enable_ultra_ssd: bool - :param enable_fips: Whether to use FIPS enabled OS + :param enable_fips: Whether to use FIPS enabled OS. :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible + values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". :type gpu_instance_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.GPUInstanceProfile """ @@ -191,6 +170,7 @@ class AgentPool(SubResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -213,7 +193,7 @@ class AgentPool(SubResource): 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, 'min_count': {'key': 'properties.minCount', 'type': 'int'}, 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, 'mode': {'key': 'properties.mode', 'type': 'str'}, 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, @@ -238,7 +218,10 @@ class AgentPool(SubResource): 'gpu_instance_profile': {'key': 'properties.gpuInstanceProfile', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPool, self).__init__(**kwargs) self.count = kwargs.get('count', None) self.vm_size = kwargs.get('vm_size', None) @@ -253,7 +236,7 @@ def __init__(self, **kwargs): self.max_count = kwargs.get('max_count', None) self.min_count = kwargs.get('min_count', None) self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) + self.type_properties_type = kwargs.get('type_properties_type', None) self.mode = kwargs.get('mode', None) self.orchestrator_version = kwargs.get('orchestrator_version', None) self.node_image_version = None @@ -265,7 +248,7 @@ def __init__(self, **kwargs): self.node_public_ip_prefix_id = kwargs.get('node_public_ip_prefix_id', None) self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) + self.spot_max_price = kwargs.get('spot_max_price', -1) self.tags = kwargs.get('tags', None) self.node_labels = kwargs.get('node_labels', None) self.node_taints = kwargs.get('node_taints', None) @@ -278,11 +261,10 @@ def __init__(self, **kwargs): self.gpu_instance_profile = kwargs.get('gpu_instance_profile', None) -class AgentPoolAvailableVersions(Model): +class AgentPoolAvailableVersions(msrest.serialization.Model): """The list of available versions for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Id of the agent pool available versions. :vartype id: str @@ -308,7 +290,10 @@ class AgentPoolAvailableVersions(Model): 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolAvailableVersions, self).__init__(**kwargs) self.id = None self.name = None @@ -316,7 +301,7 @@ def __init__(self, **kwargs): self.agent_pool_versions = kwargs.get('agent_pool_versions', None) -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): +class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(msrest.serialization.Model): """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. :param default: Whether this version is the default agent pool version. @@ -333,18 +318,49 @@ class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) self.default = kwargs.get('default', None) self.kubernetes_version = kwargs.get('kubernetes_version', None) self.is_preview = kwargs.get('is_preview', None) -class AgentPoolUpgradeProfile(Model): +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class AgentPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -354,20 +370,16 @@ class AgentPoolUpgradeProfile(Model): :vartype name: str :ivar type: Type of the agent pool upgrade profile. :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. + :param latest_node_image_version: LatestNodeImageVersion is the latest AKS supported node image + version. :type latest_node_image_version: str """ @@ -389,18 +401,21 @@ class AgentPoolUpgradeProfile(Model): 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.kubernetes_version = kwargs['kubernetes_version'] self.os_type = kwargs.get('os_type', "Linux") self.upgrades = kwargs.get('upgrades', None) self.latest_node_image_version = kwargs.get('latest_node_image_version', None) -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): +class AgentPoolUpgradeProfilePropertiesUpgradesItem(msrest.serialization.Model): """AgentPoolUpgradeProfilePropertiesUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -414,17 +429,20 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kwargs.get('kubernetes_version', None) self.is_preview = kwargs.get('is_preview', None) -class AgentPoolUpgradeSettings(Model): +class AgentPoolUpgradeSettings(msrest.serialization.Model): """Settings for upgrading an agentpool. - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default + :param max_surge: Count or percentage of additional nodes to be added during upgrade. If empty + uses AKS default. :type max_surge: str """ @@ -432,55 +450,47 @@ class AgentPoolUpgradeSettings(Model): 'max_surge': {'key': 'maxSurge', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolUpgradeSettings, self).__init__(**kwargs) self.max_surge = kwargs.get('max_surge', None) -class CloudError(Model): +class CloudError(msrest.serialization.Model): """An error response from the Container service. :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody + :type error: ~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody """ _attribute_map = { 'error': {'key': 'error', 'type': 'CloudErrorBody'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CloudError, self).__init__(**kwargs) self.error = kwargs.get('error', None) -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): +class CloudErrorBody(msrest.serialization.Model): """An error response from the Container service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: A message describing the error, intended to be suitable for display in a user + interface. :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. + :param target: The target of the particular error. For example, the name of the property in + error. :type target: str :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody] + :type details: list[~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody] """ _attribute_map = { @@ -490,7 +500,10 @@ class CloudErrorBody(Model): 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CloudErrorBody, self).__init__(**kwargs) self.code = kwargs.get('code', None) self.message = kwargs.get('message', None) @@ -498,13 +511,255 @@ def __init__(self, **kwargs): self.details = kwargs.get('details', None) -class ContainerServiceDiagnosticsProfile(Model): +class Components1Q1Og48SchemasManagedclusterAllof1(msrest.serialization.Model): + """Components1Q1Og48SchemasManagedclusterAllof1. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :param fqdn_subdomain: FQDN subdomain specified when creating private cluster with custom + private dns zone. + :type fqdn_subdomain: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :ivar private_fqdn: FQDN of private cluster. + :vartype private_fqdn: str + :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy config. + :vartype azure_portal_fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAddonProfile] + :param pod_identity_profile: Profile of managed cluster pod identity. + :type pod_identity_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityProfile + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile + :param auto_upgrade_profile: Profile of auto upgrade configuration. + :type auto_upgrade_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAutoUpgradeProfile + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :type auto_scaler_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPropertiesAutoScalerProfile + :param api_server_access_profile: Access profile for managed cluster API server. + :type api_server_access_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAPIServerAccessProfile + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. + :type disk_encryption_set_id: str + :param identity_profile: Identities associated with the cluster. + :type identity_profile: dict[str, + ~azure.mgmt.containerservice.v2021_05_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + :param private_link_resources: Private link resources associated with the cluster. + :type private_link_resources: + list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] + :param disable_local_accounts: If set to true, getting static credential will be disabled for + this cluster. Expected to only be used for AAD clusters. + :type disable_local_accounts: bool + :param http_proxy_config: Configurations for provisioning the cluster with HTTP proxy servers. + :type http_proxy_config: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterHTTPProxyConfig + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'private_fqdn': {'readonly': True}, + 'azure_portal_fqdn': {'readonly': True}, + } + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn_subdomain': {'key': 'properties.fqdnSubdomain', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, + 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, + 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, + 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, + 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + 'private_link_resources': {'key': 'properties.privateLinkResources', 'type': '[PrivateLinkResource]'}, + 'disable_local_accounts': {'key': 'properties.disableLocalAccounts', 'type': 'bool'}, + 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'ManagedClusterHTTPProxyConfig'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Q1Og48SchemasManagedclusterAllof1, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.dns_prefix = kwargs.get('dns_prefix', None) + self.fqdn_subdomain = kwargs.get('fqdn_subdomain', None) + self.fqdn = None + self.private_fqdn = None + self.azure_portal_fqdn = None + self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.linux_profile = kwargs.get('linux_profile', None) + self.windows_profile = kwargs.get('windows_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.addon_profiles = kwargs.get('addon_profiles', None) + self.pod_identity_profile = kwargs.get('pod_identity_profile', None) + self.node_resource_group = kwargs.get('node_resource_group', None) + self.enable_rbac = kwargs.get('enable_rbac', None) + self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) + self.network_profile = kwargs.get('network_profile', None) + self.aad_profile = kwargs.get('aad_profile', None) + self.auto_upgrade_profile = kwargs.get('auto_upgrade_profile', None) + self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) + self.api_server_access_profile = kwargs.get('api_server_access_profile', None) + self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) + self.identity_profile = kwargs.get('identity_profile', None) + self.private_link_resources = kwargs.get('private_link_resources', None) + self.disable_local_accounts = kwargs.get('disable_local_accounts', None) + self.http_proxy_config = kwargs.get('http_proxy_config', None) + + +class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedIdentity(msrest.serialization.Model): + """UserAssignedIdentity. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.client_id = kwargs.get('client_id', None) + self.object_id = kwargs.get('object_id', None) + + +class ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties(UserAssignedIdentity): + """ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties, self).__init__(**kwargs) + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): """Profile for diagnostics on the container service cluster. All required parameters must be populated in order to send to Azure. - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. :type vm_diagnostics: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceVMDiagnostics """ @@ -517,23 +772,23 @@ class ContainerServiceDiagnosticsProfile(Model): 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) + self.vm_diagnostics = kwargs['vm_diagnostics'] -class ContainerServiceLinuxProfile(Model): +class ContainerServiceLinuxProfile(msrest.serialization.Model): """Profile for Linux VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. The administrator username to use for - Linux VMs. + :param admin_username: Required. The administrator username to use for Linux VMs. :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceSshConfiguration + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceSshConfiguration """ _validation = { @@ -546,93 +801,79 @@ class ContainerServiceLinuxProfile(Model): 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) + self.admin_username = kwargs['admin_username'] + self.ssh = kwargs['ssh'] -class ContainerServiceMasterProfile(Model): +class ContainerServiceMasterProfile(msrest.serialization.Model): """Profile for the container service master. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2021_05_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". :type storage_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceStorageProfileTypes :ivar fqdn: FQDN for the master pool. @@ -642,6 +883,7 @@ class ContainerServiceMasterProfile(Model): _validation = { 'dns_prefix': {'required': True}, 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'fqdn': {'readonly': True}, } @@ -656,11 +898,14 @@ class ContainerServiceMasterProfile(Model): 'fqdn': {'key': 'fqdn', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) + self.count = kwargs.get('count', "1") + self.dns_prefix = kwargs['dns_prefix'] + self.vm_size = kwargs['vm_size'] self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") @@ -668,46 +913,35 @@ def __init__(self, **kwargs): self.fqdn = None -class ContainerServiceNetworkProfile(Model): +class ContainerServiceNetworkProfile(msrest.serialization.Model): """Profile of network configuration. - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . + :param network_plugin: Network plugin used for building Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPolicy + :param network_mode: Network mode used for building Kubernetes network. Possible values + include: "transparent", "bridge". + :type network_mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.NetworkMode + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2021_05_01.models.LoadBalancerSku + :param outbound_type: The outbound (egress) routing method. Possible values include: + "loadBalancer", "userDefinedRouting". Default value: "loadBalancer". + :type outbound_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OutboundType + :param load_balancer_sku: The load balancer sku for the managed cluster. Possible values + include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.LoadBalancerSku :param load_balancer_profile: Profile of the cluster load balancer. :type load_balancer_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfile @@ -733,7 +967,10 @@ class ContainerServiceNetworkProfile(Model): 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceNetworkProfile, self).__init__(**kwargs) self.network_plugin = kwargs.get('network_plugin', "kubenet") self.network_policy = kwargs.get('network_policy', None) @@ -747,13 +984,13 @@ def __init__(self, **kwargs): self.load_balancer_profile = kwargs.get('load_balancer_profile', None) -class ContainerServiceSshConfiguration(Model): +class ContainerServiceSshConfiguration(msrest.serialization.Model): """SSH configuration for Linux-based VMs running on Azure. All required parameters must be populated in order to send to Azure. - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. :type public_keys: list[~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceSshPublicKey] """ @@ -766,19 +1003,21 @@ class ContainerServiceSshConfiguration(Model): 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) + self.public_keys = kwargs['public_keys'] -class ContainerServiceSshPublicKey(Model): +class ContainerServiceSshPublicKey(msrest.serialization.Model): """Contains information about SSH certificate public key data. All required parameters must be populated in order to send to Azure. - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. :type key_data: str """ @@ -790,24 +1029,24 @@ class ContainerServiceSshPublicKey(Model): 'key_data': {'key': 'keyData', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) + self.key_data = kwargs['key_data'] -class ContainerServiceVMDiagnostics(Model): +class ContainerServiceVMDiagnostics(msrest.serialization.Model): """Profile for diagnostics on the container service VMs. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. + :ivar storage_uri: The URI of the storage account where diagnostics are stored. :vartype storage_uri: str """ @@ -821,17 +1060,19 @@ class ContainerServiceVMDiagnostics(Model): 'storage_uri': {'key': 'storageUri', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) + self.enabled = kwargs['enabled'] self.storage_uri = None -class CredentialResult(Model): +class CredentialResult(msrest.serialization.Model): """The credential result response. - Variables are only populated by the server, and will be ignored when - sending a request. + 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 @@ -849,21 +1090,22 @@ class CredentialResult(Model): 'value': {'key': 'value', 'type': 'bytearray'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CredentialResult, self).__init__(**kwargs) self.name = None self.value = None -class CredentialResults(Model): +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. + Variables are only populated by the server, and will be ignored when sending a request. :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2021_05_01.models.CredentialResult] + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2021_05_01.models.CredentialResult] """ _validation = { @@ -874,20 +1116,21 @@ class CredentialResults(Model): 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CredentialResults, self).__init__(**kwargs) self.kubeconfigs = None -class EndpointDependency(Model): +class EndpointDependency(msrest.serialization.Model): """A domain name that AKS agent nodes are reaching at. :param domain_name: The domain name of the dependency. :type domain_name: str - :param endpoint_details: The Ports and Protocols used when connecting to - domainName. - :type endpoint_details: - list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDetail] + :param endpoint_details: The Ports and Protocols used when connecting to domainName. + :type endpoint_details: list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDetail] """ _attribute_map = { @@ -895,22 +1138,25 @@ class EndpointDependency(Model): 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(EndpointDependency, self).__init__(**kwargs) self.domain_name = kwargs.get('domain_name', None) self.endpoint_details = kwargs.get('endpoint_details', None) -class EndpointDetail(Model): +class EndpointDetail(msrest.serialization.Model): """connect information from the AKS agent nodes to a single endpoint. :param ip_address: An IP Address that Domain Name currently resolves to. :type ip_address: str :param port: The port an endpoint is connected to. :type port: int - :param protocol: The protocol used for connection + :param protocol: The protocol used for connection. :type protocol: str - :param description: Description of the detail + :param description: Description of the detail. :type description: str """ @@ -921,7 +1167,10 @@ class EndpointDetail(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(EndpointDetail, self).__init__(**kwargs) self.ip_address = kwargs.get('ip_address', None) self.port = kwargs.get('port', None) @@ -929,15 +1178,13 @@ def __init__(self, **kwargs): self.description = kwargs.get('description', None) -class ExtendedLocation(Model): +class ExtendedLocation(msrest.serialization.Model): """The complex type of the extended location. :param name: The name of the extended location. :type name: str - :param type: The type of the extended location. Possible values include: - 'EdgeZone' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocationTypes + :param type: The type of the extended location. Possible values include: "EdgeZone". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocationTypes """ _attribute_map = { @@ -945,41 +1192,43 @@ class ExtendedLocation(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ExtendedLocation, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.type = kwargs.get('type', None) -class KubeletConfig(Model): +class KubeletConfig(msrest.serialization.Model): """Kubelet configurations of agent nodes. :param cpu_manager_policy: CPU Manager policy to use. :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. + :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that specify CPU limits. :type cpu_cfs_quota: bool :param cpu_cfs_quota_period: Sets CPU CFS quota period value. :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. + :param image_gc_high_threshold: The percent of disk usage after which image garbage collection + is always run. :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. + :param image_gc_low_threshold: The percent of disk usage before which image garbage collection + is never run. :type image_gc_low_threshold: int :param topology_manager_policy: Topology Manager policy to use. :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). + :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe sysctl patterns (ending in + ``*``\ ). :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. + :param fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled + on the node. :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. + :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before it + is rotated. :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. + :param container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. :type container_log_max_files: int :param pod_max_pids: The maximum number of processes per pod. :type pod_max_pids: int @@ -1003,7 +1252,10 @@ class KubeletConfig(Model): 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(KubeletConfig, self).__init__(**kwargs) self.cpu_manager_policy = kwargs.get('cpu_manager_policy', None) self.cpu_cfs_quota = kwargs.get('cpu_cfs_quota', None) @@ -1018,20 +1270,17 @@ def __init__(self, **kwargs): self.pod_max_pids = kwargs.get('pod_max_pids', None) -class LinuxOSConfig(Model): +class LinuxOSConfig(msrest.serialization.Model): """OS configurations of Linux agent nodes. :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2021_05_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. + :type sysctls: ~azure.mgmt.containerservice.v2021_05_01.models.SysctlConfig + :param transparent_huge_page_enabled: Transparent Huge Page enabled configuration. :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. + :param transparent_huge_page_defrag: Transparent Huge Page defrag configuration. :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. + :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap file will be created on + each node. :type swap_file_size_mb: int """ @@ -1042,7 +1291,10 @@ class LinuxOSConfig(Model): 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(LinuxOSConfig, self).__init__(**kwargs) self.sysctls = kwargs.get('sysctls', None) self.transparent_huge_page_enabled = kwargs.get('transparent_huge_page_enabled', None) @@ -1053,25 +1305,21 @@ def __init__(self, **kwargs): class MaintenanceConfiguration(SubResource): """maintenance configuration. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2021_05_01.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2021_05_01.models.SystemData :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_05_01.models.TimeInWeek] + :type time_in_week: list[~azure.mgmt.containerservice.v2021_05_01.models.TimeInWeek] :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_05_01.models.TimeSpan] + :type not_allowed_time: list[~azure.mgmt.containerservice.v2021_05_01.models.TimeSpan] """ _validation = { @@ -1090,30 +1338,61 @@ class MaintenanceConfiguration(SubResource): 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(MaintenanceConfiguration, self).__init__(**kwargs) self.system_data = None self.time_in_week = kwargs.get('time_in_week', None) self.not_allowed_time = kwargs.get('not_allowed_time', None) -class Resource(Model): +class MaintenanceConfigurationListResult(msrest.serialization.Model): + """The response from the List maintenance configurations operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of maintenance configurations. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration] + :ivar next_link: The URL to get the next set of maintenance configuration results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MaintenanceConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MaintenanceConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class Resource(msrest.serialization.Model): """The Resource model definition. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -1132,70 +1411,58 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = kwargs.get('location', None) + self.location = kwargs['location'] self.tags = kwargs.get('tags', None) -class ManagedCluster(Resource): +class ManagedCluster(Resource, Components1Q1Og48SchemasManagedclusterAllof1): """Managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. :type kubernetes_version: str :param dns_prefix: DNS prefix specified when creating the managed cluster. :type dns_prefix: str - :param fqdn_subdomain: FQDN subdomain specified when creating private - cluster with custom private dns zone. + :param fqdn_subdomain: FQDN subdomain specified when creating private cluster with custom + private dns zone. :type fqdn_subdomain: str :ivar fqdn: FQDN for the master pool. :vartype fqdn: str :ivar private_fqdn: FQDN of private cluster. :vartype private_fqdn: str - :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy - config. + :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy config. :vartype azure_portal_fqdn: str :param agent_pool_profiles: Properties of the agent pool. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. + :param linux_profile: Profile for Linux VMs in the container service cluster. :type linux_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. + :param windows_profile: Profile for Windows VMs in the container service cluster. :type windows_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. :type service_principal_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterServicePrincipalProfile :param addon_profiles: Profile of managed cluster add-on. @@ -1204,81 +1471,74 @@ class ManagedCluster(Resource): :param pod_identity_profile: Profile of managed cluster pod identity. :type pod_identity_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. + :param node_resource_group: Name of the resource group containing agent pool nodes. :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. :type enable_pod_security_policy: bool :param network_profile: Profile of network configuration. :type network_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceNetworkProfile :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile + :type aad_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile :param auto_upgrade_profile: Profile of auto upgrade configuration. :type auto_upgrade_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. :type auto_scaler_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. + :param api_server_access_profile: Access profile for managed cluster API server. :type api_server_access_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. :type disk_encryption_set_id: str :param identity_profile: Identities associated with the cluster. :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param private_link_resources: Private link resources associated with the - cluster. + ~azure.mgmt.containerservice.v2021_05_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + :param private_link_resources: Private link resources associated with the cluster. :type private_link_resources: list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] - :param disable_local_accounts: If set to true, getting static credential - will be disabled for this cluster. Expected to only be used for AAD - clusters. + :param disable_local_accounts: If set to true, getting static credential will be disabled for + this cluster. Expected to only be used for AAD clusters. :type disable_local_accounts: bool - :param http_proxy_config: Configurations for provisioning the cluster with - HTTP proxy servers. + :param http_proxy_config: Configurations for provisioning the cluster with HTTP proxy servers. :type http_proxy_config: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterHTTPProxyConfig - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentity + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKU + :type sku: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKU :param extended_location: The extended location of the Virtual Machine. - :type extended_location: - ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocation + :type extended_location: ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocation """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, 'max_agent_pools': {'readonly': True}, 'fqdn': {'readonly': True}, 'private_fqdn': {'readonly': True}, 'azure_portal_fqdn': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, @@ -1303,17 +1563,25 @@ class ManagedCluster(Resource): 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, 'private_link_resources': {'key': 'properties.privateLinkResources', 'type': '[PrivateLinkResource]'}, 'disable_local_accounts': {'key': 'properties.disableLocalAccounts', 'type': 'bool'}, 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'ManagedClusterHTTPProxyConfig'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedCluster, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) self.provisioning_state = None self.power_state = None self.max_agent_pools = None @@ -1342,48 +1610,55 @@ def __init__(self, **kwargs): self.private_link_resources = kwargs.get('private_link_resources', None) self.disable_local_accounts = kwargs.get('disable_local_accounts', None) self.http_proxy_config = kwargs.get('http_proxy_config', None) - self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.extended_location = kwargs.get('extended_location', None) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) self.sku = kwargs.get('sku', None) self.extended_location = kwargs.get('extended_location', None) -class ManagedClusterAADProfile(Model): +class ManagedClusterAADProfile(msrest.serialization.Model): """AADProfile specifies attributes for Azure Active Directory integration. :param managed: Whether to enable managed AAD. :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. + :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] + :param admin_group_object_i_ds: AAD group object IDs that will have admin role of the cluster. + :type admin_group_object_i_ds: list[str] :param client_app_id: The client AAD application ID. :type client_app_id: str :param server_app_id: The server AAD application ID. :type server_app_id: str :param server_app_secret: The server AAD application secret. :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. :type tenant_id: str """ _attribute_map = { 'managed': {'key': 'managed', 'type': 'bool'}, 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, + 'admin_group_object_i_ds': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, 'tenant_id': {'key': 'tenantID', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAADProfile, self).__init__(**kwargs) self.managed = kwargs.get('managed', None) self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) + self.admin_group_object_i_ds = kwargs.get('admin_group_object_i_ds', None) self.client_app_id = kwargs.get('client_app_id', None) self.server_app_id = kwargs.get('server_app_id', None) self.server_app_secret = kwargs.get('server_app_secret', None) @@ -1393,20 +1668,19 @@ def __init__(self, **kwargs): class ManagedClusterAccessProfile(Resource): """Managed cluster Access Profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param kube_config: Base64-encoded Kubernetes configuration file. :type kube_config: bytearray @@ -1428,16 +1702,18 @@ class ManagedClusterAccessProfile(Resource): 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAccessProfile, self).__init__(**kwargs) self.kube_config = kwargs.get('kube_config', None) -class ManagedClusterAddonProfile(Model): +class ManagedClusterAddonProfile(msrest.serialization.Model): """A Kubernetes add-on profile for a managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -1461,37 +1737,16 @@ class ManagedClusterAddonProfile(Model): 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) + self.enabled = kwargs['enabled'] self.config = kwargs.get('config', None) self.identity = None -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): """Information of user assigned identity used by this add-on. @@ -1509,144 +1764,128 @@ class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): 'object_id': {'key': 'objectId', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) -class ManagedClusterAgentPoolProfileProperties(Model): +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): """Properties for the container service agent pool profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 1000 (inclusive) for user pools and in - the range of 1 to 1000 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. :type count: int :param vm_size: Size of agent VMs. :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param os_sku: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner + for Linux OSType. Not applicable to Windows OSType. Possible values include: "Ubuntu", + "CBLMariner". :type os_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. + :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs assigned from this + Public IP Prefix. :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param enable_ultra_ssd: Whether to enable UltraSSD + :param enable_ultra_ssd: Whether to enable UltraSSD. :type enable_ultra_ssd: bool - :param enable_fips: Whether to use FIPS enabled OS + :param enable_fips: Whether to use FIPS enabled OS. :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible + values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". :type gpu_instance_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.GPUInstanceProfile """ _validation = { + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1691,7 +1930,10 @@ class ManagedClusterAgentPoolProfileProperties(Model): 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) self.count = kwargs.get('count', None) self.vm_size = kwargs.get('vm_size', None) @@ -1718,7 +1960,7 @@ def __init__(self, **kwargs): self.node_public_ip_prefix_id = kwargs.get('node_public_ip_prefix_id', None) self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) + self.spot_max_price = kwargs.get('spot_max_price', -1) self.tags = kwargs.get('tags', None) self.node_labels = kwargs.get('node_labels', None) self.node_taints = kwargs.get('node_taints', None) @@ -1734,142 +1976,123 @@ def __init__(self, **kwargs): class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): """Profile for the container service agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 1000 (inclusive) for user pools and in - the range of 1 to 1000 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. :type count: int :param vm_size: Size of agent VMs. :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param os_sku: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner + for Linux OSType. Not applicable to Windows OSType. Possible values include: "Ubuntu", + "CBLMariner". :type os_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. + :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs assigned from this + Public IP Prefix. :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param enable_ultra_ssd: Whether to enable UltraSSD + :param enable_ultra_ssd: Whether to enable UltraSSD. :type enable_ultra_ssd: bool - :param enable_fips: Whether to use FIPS enabled OS + :param enable_fips: Whether to use FIPS enabled OS. :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible + values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". :type gpu_instance_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.GPUInstanceProfile - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. :type name: str """ _validation = { + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1916,24 +2139,25 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) + self.name = kwargs['name'] -class ManagedClusterAPIServerAccessProfile(Model): +class ManagedClusterAPIServerAccessProfile(msrest.serialization.Model): """Access profile for managed cluster API server. - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. + :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. + :param enable_private_cluster: Whether to create the cluster as a private cluster or not. :type enable_private_cluster: bool :param private_dns_zone: Private dns zone mode for private cluster. :type private_dns_zone: str - :param enable_private_cluster_public_fqdn: Whether to create additional - public FQDN for private cluster or not. + :param enable_private_cluster_public_fqdn: Whether to create additional public FQDN for private + cluster or not. :type enable_private_cluster_public_fqdn: bool """ @@ -1944,7 +2168,10 @@ class ManagedClusterAPIServerAccessProfile(Model): 'enable_private_cluster_public_fqdn': {'key': 'enablePrivateClusterPublicFQDN', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) self.enable_private_cluster = kwargs.get('enable_private_cluster', None) @@ -1952,25 +2179,27 @@ def __init__(self, **kwargs): self.enable_private_cluster_public_fqdn = kwargs.get('enable_private_cluster_public_fqdn', None) -class ManagedClusterAutoUpgradeProfile(Model): +class ManagedClusterAutoUpgradeProfile(msrest.serialization.Model): """Auto upgrade profile for a managed cluster. - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'node-image', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2021_05_01.models.UpgradeChannel + :param upgrade_channel: upgrade channel for auto upgrade. Possible values include: "rapid", + "stable", "patch", "node-image", "none". + :type upgrade_channel: str or ~azure.mgmt.containerservice.v2021_05_01.models.UpgradeChannel """ _attribute_map = { 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) self.upgrade_channel = kwargs.get('upgrade_channel', None) -class ManagedClusterHTTPProxyConfig(Model): +class ManagedClusterHTTPProxyConfig(msrest.serialization.Model): """Configurations for provisioning the cluster with HTTP proxy servers. :param http_proxy: HTTP proxy server endpoint to use. @@ -1979,8 +2208,7 @@ class ManagedClusterHTTPProxyConfig(Model): :type https_proxy: str :param no_proxy: Endpoints that should not go through proxy. :type no_proxy: list[str] - :param trusted_ca: Alternative CA cert to use for connecting to proxy - servers. + :param trusted_ca: Alternative CA cert to use for connecting to proxy servers. :type trusted_ca: str """ @@ -1991,7 +2219,10 @@ class ManagedClusterHTTPProxyConfig(Model): 'trusted_ca': {'key': 'trustedCa', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterHTTPProxyConfig, self).__init__(**kwargs) self.http_proxy = kwargs.get('http_proxy', None) self.https_proxy = kwargs.get('https_proxy', None) @@ -1999,33 +2230,29 @@ def __init__(self, **kwargs): self.trusted_ca = kwargs.get('trusted_ca', None) -class ManagedClusterIdentity(Model): +class ManagedClusterIdentity(msrest.serialization.Model): """Identity for the managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: + :param type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use + an implicitly created identity in master components and an auto-created user assigned identity + in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, + service principal will be used instead. Possible values include: "SystemAssigned", + "UserAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.ResourceIdentityType + :param user_assigned_identities: The user identity associated with the managed cluster. This + identity will be used in control plane and only one user assigned identity is allowed. The user + identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] + ~azure.mgmt.containerservice.v2021_05_01.models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties] """ _validation = { @@ -2036,11 +2263,14 @@ class ManagedClusterIdentity(Model): _attribute_map = { 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None @@ -2048,61 +2278,58 @@ def __init__(self, **kwargs): self.user_assigned_identities = kwargs.get('user_assigned_identities', None) -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str """ _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, + 'next_link': {'readonly': True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, **kwargs): - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None + def __init__( + self, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None -class ManagedClusterLoadBalancerProfile(Model): +class ManagedClusterLoadBalancerProfile(msrest.serialization.Model): """Profile of the managed cluster load balancer. - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: + :param managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :type managed_outbound_i_ps: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. + :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load + balancer. :type outbound_ip_prefixes: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: + :param outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :type outbound_i_ps: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: + :param effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :type effective_outbound_i_ps: list[~azure.mgmt.containerservice.v2021_05_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . + :param allocated_outbound_ports: Desired number of allocated SNAT ports per VM. Allowed values + must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure + dynamically allocating ports. :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . + :param idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. :type idle_timeout_in_minutes: int """ @@ -2112,30 +2339,32 @@ class ManagedClusterLoadBalancerProfile(Model): } _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, + 'managed_outbound_i_ps': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, + 'outbound_i_ps': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, + 'effective_outbound_i_ps': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) + self.managed_outbound_i_ps = kwargs.get('managed_outbound_i_ps', None) self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) + self.outbound_i_ps = kwargs.get('outbound_i_ps', None) + self.effective_outbound_i_ps = kwargs.get('effective_outbound_i_ps', None) self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileManagedOutboundIPs(msrest.serialization.Model): """Desired managed outbound IPs for the cluster load balancer. - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . + :param count: Desired number of outbound IP created/managed by Azure for the cluster load + balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. :type count: int """ @@ -2147,12 +2376,15 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): 'count': {'key': 'count', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) self.count = kwargs.get('count', 1) -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): +class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(msrest.serialization.Model): """Desired outbound IP Prefix resources for the cluster load balancer. :param public_ip_prefixes: A list of public IP prefix resources. @@ -2164,33 +2396,37 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileOutboundIPs(msrest.serialization.Model): """Desired outbound IP resources for the cluster load balancer. - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2021_05_01.models.ResourceReference] + :param public_i_ps: A list of public IP resources. + :type public_i_ps: list[~azure.mgmt.containerservice.v2021_05_01.models.ResourceReference] """ _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, + 'public_i_ps': {'key': 'publicIPs', 'type': '[ResourceReference]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) + self.public_i_ps = kwargs.get('public_i_ps', None) -class ManagedClusterPodIdentity(Model): +class ManagedClusterPodIdentity(msrest.serialization.Model): """ManagedClusterPodIdentity. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2198,15 +2434,12 @@ class ManagedClusterPodIdentity(Model): :type name: str :param namespace: Required. Namespace of the pod identity. :type namespace: str - :param binding_selector: Binding selector to use for the - AzureIdentityBinding resource. + :param binding_selector: Binding selector to use for the AzureIdentityBinding resource. :type binding_selector: str :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2021_05_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' + :type identity: ~azure.mgmt.containerservice.v2021_05_01.models.UserAssignedIdentity + :ivar provisioning_state: The current provisioning state of the pod identity. Possible values + include: "Assigned", "Updating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityProvisioningState :ivar provisioning_info: @@ -2231,17 +2464,20 @@ class ManagedClusterPodIdentity(Model): 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) + self.name = kwargs['name'] + self.namespace = kwargs['namespace'] self.binding_selector = kwargs.get('binding_selector', None) - self.identity = kwargs.get('identity', None) + self.identity = kwargs['identity'] self.provisioning_state = None self.provisioning_info = None -class ManagedClusterPodIdentityException(Model): +class ManagedClusterPodIdentityException(msrest.serialization.Model): """ManagedClusterPodIdentityException. All required parameters must be populated in order to send to Azure. @@ -2266,26 +2502,28 @@ class ManagedClusterPodIdentityException(Model): 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.pod_labels = kwargs.get('pod_labels', None) + self.name = kwargs['name'] + self.namespace = kwargs['namespace'] + self.pod_labels = kwargs['pod_labels'] -class ManagedClusterPodIdentityProfile(Model): +class ManagedClusterPodIdentityProfile(msrest.serialization.Model): """ManagedClusterPodIdentityProfile. :param enabled: Whether the pod identity addon is enabled. :type enabled: bool - :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod - identity addon in cluster using Kubenet network plugin. + :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod identity addon in + cluster using Kubenet network plugin. :type allow_network_plugin_kubenet: bool :param user_assigned_identities: User assigned pod identity settings. :type user_assigned_identities: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. + :param user_assigned_identity_exceptions: User assigned pod identity exception settings. :type user_assigned_identity_exceptions: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityException] """ @@ -2297,7 +2535,10 @@ class ManagedClusterPodIdentityProfile(Model): 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) self.enabled = kwargs.get('enabled', None) self.allow_network_plugin_kubenet = kwargs.get('allow_network_plugin_kubenet', None) @@ -2305,7 +2546,7 @@ def __init__(self, **kwargs): self.user_assigned_identity_exceptions = kwargs.get('user_assigned_identity_exceptions', None) -class ManagedClusterPodIdentityProvisioningInfo(Model): +class ManagedClusterPodIdentityProvisioningInfo(msrest.serialization.Model): """ManagedClusterPodIdentityProvisioningInfo. :param error: Pod identity assignment error (if any). @@ -2316,28 +2557,27 @@ class ManagedClusterPodIdentityProvisioningInfo(Model): 'error': {'key': 'error', 'type': 'CloudError'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) self.error = kwargs.get('error', None) -class ManagedClusterPoolUpgradeProfile(Model): +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrade versions. All required parameters must be populated in order to send to Azure. - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str :param name: Pool name. :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] """ @@ -2354,15 +2594,18 @@ class ManagedClusterPoolUpgradeProfile(Model): 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.kubernetes_version = kwargs['kubernetes_version'] self.name = kwargs.get('name', None) self.os_type = kwargs.get('os_type', "Linux") self.upgrades = kwargs.get('upgrades', None) -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): """ManagedClusterPoolUpgradeProfileUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -2376,21 +2619,22 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kwargs.get('kubernetes_version', None) self.is_preview = kwargs.get('is_preview', None) -class ManagedClusterPropertiesAutoScalerProfile(Model): +class ManagedClusterPropertiesAutoScalerProfile(msrest.serialization.Model): """Parameters to be applied to the cluster-autoscaler when enabled. :param balance_similar_node_groups: :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2021_05_01.models.Expander + :param expander: Possible values include: "least-waste", "most-pods", "priority", "random". + :type expander: str or ~azure.mgmt.containerservice.v2021_05_01.models.Expander :param max_empty_bulk_delete: :type max_empty_bulk_delete: str :param max_graceful_termination_sec: @@ -2443,7 +2687,10 @@ class ManagedClusterPropertiesAutoScalerProfile(Model): 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) self.expander = kwargs.get('expander', None) @@ -2464,37 +2711,14 @@ def __init__(self, **kwargs): self.skip_nodes_with_system_pods = kwargs.get('skip_nodes_with_system_pods', None) -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. All required parameters must be populated in order to send to Azure. :param client_id: Required. The ID for the service principal. :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. + :param secret: The secret password associated with the service principal in plain text. :type secret: str """ @@ -2507,23 +2731,22 @@ class ManagedClusterServicePrincipalProfile(Model): 'secret': {'key': 'secret', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) + self.client_id = kwargs['client_id'] self.secret = kwargs.get('secret', None) -class ManagedClusterSKU(Model): +class ManagedClusterSKU(msrest.serialization.Model): """ManagedClusterSKU. - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUTier + :param name: Name of a managed cluster SKU. Possible values include: "Basic". + :type name: str or ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUName + :param tier: Tier of a managed cluster SKU. Possible values include: "Paid", "Free". + :type tier: str or ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUTier """ _attribute_map = { @@ -2531,17 +2754,19 @@ class ManagedClusterSKU(Model): 'tier': {'key': 'tier', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterSKU, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.tier = kwargs.get('tier', None) -class ManagedClusterUpgradeProfile(Model): +class ManagedClusterUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for compute pools. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2551,12 +2776,11 @@ class ManagedClusterUpgradeProfile(Model): :vartype name: str :ivar type: Type of upgrade profile. :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. :type control_plane_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPoolUpgradeProfile] """ @@ -2577,43 +2801,42 @@ class ManagedClusterUpgradeProfile(Model): 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.control_plane_profile = kwargs['control_plane_profile'] + self.agent_pool_profiles = kwargs['agent_pool_profiles'] -class ManagedClusterWindowsProfile(Model): +class ManagedClusterWindowsProfile(msrest.serialization.Model): """Profile for Windows VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.LicenseType + :param license_type: The licenseType to use for Windows VMs. Windows_Server is used to enable + Azure Hybrid User Benefits for Windows VMs. Possible values include: "None", "Windows_Server". + :type license_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.LicenseType :param enable_csi_proxy: Whether to enable CSI proxy. :type enable_csi_proxy: bool """ @@ -2629,19 +2852,46 @@ class ManagedClusterWindowsProfile(Model): 'enable_csi_proxy': {'key': 'enableCSIProxy', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) + self.admin_username = kwargs['admin_username'] self.admin_password = kwargs.get('admin_password', None) self.license_type = kwargs.get('license_type', None) self.enable_csi_proxy = kwargs.get('enable_csi_proxy', None) -class OperationValue(Model): +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.containerservice.v2021_05_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): """Describes the properties of a Compute Operation value. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar origin: The origin of the compute operation. :vartype origin: str @@ -2675,7 +2925,10 @@ class OperationValue(Model): 'provider': {'key': 'display.provider', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(OperationValue, self).__init__(**kwargs) self.origin = None self.name = None @@ -2685,11 +2938,10 @@ def __init__(self, **kwargs): self.provider = None -class OSOptionProfile(Model): +class OSOptionProfile(msrest.serialization.Model): """The OS option profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2699,8 +2951,7 @@ class OSOptionProfile(Model): :vartype name: str :ivar type: Type of the OS option profile. :vartype type: str - :param os_option_property_list: Required. The list of OS option - properties. + :param os_option_property_list: Required. The list of OS option properties. :type os_option_property_list: list[~azure.mgmt.containerservice.v2021_05_01.models.OSOptionProperty] """ @@ -2719,15 +2970,18 @@ class OSOptionProfile(Model): 'os_option_property_list': {'key': 'properties.osOptionPropertyList', 'type': '[OSOptionProperty]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(OSOptionProfile, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.os_option_property_list = kwargs.get('os_option_property_list', None) + self.os_option_property_list = kwargs['os_option_property_list'] -class OSOptionProperty(Model): +class OSOptionProperty(msrest.serialization.Model): """OS option property. All required parameters must be populated in order to send to Azure. @@ -2748,21 +3002,23 @@ class OSOptionProperty(Model): 'enable_fips_image': {'key': 'enable-fips-image', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(OSOptionProperty, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.enable_fips_image = kwargs.get('enable_fips_image', None) + self.os_type = kwargs['os_type'] + self.enable_fips_image = kwargs['enable_fips_image'] -class OutboundEnvironmentEndpoint(Model): +class OutboundEnvironmentEndpoint(msrest.serialization.Model): """Egress endpoints which AKS agent nodes connect to for common purpose. - :param category: The category of endpoints accessed by the AKS agent node, - e.g. azure-resource-management, apiserver, etc. + :param category: The category of endpoints accessed by the AKS agent node, e.g. + azure-resource-management, apiserver, etc. :type category: str - :param endpoints: The endpoints that AKS agent nodes connect to - :type endpoints: - list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDependency] + :param endpoints: The endpoints that AKS agent nodes connect to. + :type endpoints: list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDependency] """ _attribute_map = { @@ -2770,17 +3026,52 @@ class OutboundEnvironmentEndpoint(Model): 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) self.category = kwargs.get('category', None) self.endpoints = kwargs.get('endpoints', None) -class PowerState(Model): +class OutboundEnvironmentEndpointCollection(msrest.serialization.Model): + """Collection of OutboundEnvironmentEndpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.OutboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OutboundEnvironmentEndpointCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class PowerState(msrest.serialization.Model): """Describes the Power State of the cluster. - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' + :param code: Tells whether the cluster is Running or Stopped. Possible values include: + "Running", "Stopped". :type code: str or ~azure.mgmt.containerservice.v2021_05_01.models.Code """ @@ -2788,15 +3079,18 @@ class PowerState(Model): 'code': {'key': 'code', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PowerState, self).__init__(**kwargs) self.code = kwargs.get('code', None) -class PrivateEndpoint(Model): +class PrivateEndpoint(msrest.serialization.Model): """Private endpoint which a connection belongs to. - :param id: The resource Id for private endpoint + :param id: The resource Id for private endpoint. :type id: str """ @@ -2804,18 +3098,18 @@ class PrivateEndpoint(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateEndpoint, self).__init__(**kwargs) self.id = kwargs.get('id', None) -class PrivateEndpointConnection(Model): +class PrivateEndpointConnection(msrest.serialization.Model): """A private endpoint connection. - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The ID of the private endpoint connection. :vartype id: str @@ -2823,16 +3117,14 @@ class PrivateEndpointConnection(Model): :vartype name: str :ivar type: The resource type. :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + :ivar provisioning_state: The current provisioning state. Possible values include: "Succeeded", + "Creating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnectionProvisioningState :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. + :type private_endpoint: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. :type private_link_service_connection_state: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkServiceConnectionState """ @@ -2842,7 +3134,6 @@ class PrivateEndpointConnection(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, } _attribute_map = { @@ -2854,7 +3145,10 @@ class PrivateEndpointConnection(Model): 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateEndpointConnection, self).__init__(**kwargs) self.id = None self.name = None @@ -2864,28 +3158,29 @@ def __init__(self, **kwargs): self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) -class PrivateEndpointConnectionListResult(Model): +class PrivateEndpointConnectionListResult(msrest.serialization.Model): """A list of private endpoint connections. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection] + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) self.value = kwargs.get('value', None) -class PrivateLinkResource(Model): +class PrivateLinkResource(msrest.serialization.Model): """A private link resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: The ID of the private link resource. :type id: str @@ -2895,10 +3190,10 @@ class PrivateLinkResource(Model): :type type: str :param group_id: The group ID of the resource. :type group_id: str - :param required_members: RequiredMembers of the resource + :param required_members: RequiredMembers of the resource. :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. + :ivar private_link_service_id: The private link service ID of the resource, this field is + exposed only to NRP internally. :vartype private_link_service_id: str """ @@ -2915,7 +3210,10 @@ class PrivateLinkResource(Model): 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateLinkResource, self).__init__(**kwargs) self.id = kwargs.get('id', None) self.name = kwargs.get('name', None) @@ -2925,30 +3223,31 @@ def __init__(self, **kwargs): self.private_link_service_id = None -class PrivateLinkResourcesListResult(Model): +class PrivateLinkResourcesListResult(msrest.serialization.Model): """A list of private link resources. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateLinkResourcesListResult, self).__init__(**kwargs) self.value = kwargs.get('value', None) -class PrivateLinkServiceConnectionState(Model): +class PrivateLinkServiceConnectionState(msrest.serialization.Model): """The state of a private link service connection. - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ConnectionStatus + :param status: The private link service connection status. Possible values include: "Pending", + "Approved", "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.containerservice.v2021_05_01.models.ConnectionStatus :param description: The private link service connection description. :type description: str """ @@ -2958,13 +3257,16 @@ class PrivateLinkServiceConnectionState(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) self.status = kwargs.get('status', None) self.description = kwargs.get('description', None) -class ResourceReference(Model): +class ResourceReference(msrest.serialization.Model): """A reference to an Azure resource. :param id: The fully qualified Azure resource id. @@ -2975,20 +3277,22 @@ class ResourceReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ResourceReference, self).__init__(**kwargs) self.id = kwargs.get('id', None) -class RunCommandRequest(Model): +class RunCommandRequest(msrest.serialization.Model): """run command request. All required parameters must be populated in order to send to Azure. :param command: Required. command to run. :type command: str - :param context: base64 encoded zip file, contains files required by the - command + :param context: base64 encoded zip file, contains files required by the command. :type context: str :param cluster_token: AuthToken issued for AKS AAD Server App. :type cluster_token: str @@ -3004,29 +3308,31 @@ class RunCommandRequest(Model): 'cluster_token': {'key': 'clusterToken', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(RunCommandRequest, self).__init__(**kwargs) - self.command = kwargs.get('command', None) + self.command = kwargs['command'] self.context = kwargs.get('context', None) self.cluster_token = kwargs.get('cluster_token', None) -class RunCommandResult(Model): +class RunCommandResult(msrest.serialization.Model): """run command result. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: command id. :vartype id: str - :ivar provisioning_state: provisioning State + :ivar provisioning_state: provisioning State. :vartype provisioning_state: str - :ivar exit_code: exit code of the command + :ivar exit_code: exit code of the command. :vartype exit_code: int :ivar started_at: time when the command started. - :vartype started_at: datetime + :vartype started_at: ~datetime.datetime :ivar finished_at: time when the command finished. - :vartype finished_at: datetime + :vartype finished_at: ~datetime.datetime :ivar logs: command output. :vartype logs: str :ivar reason: explain why provisioningState is set to failed (if so). @@ -3053,7 +3359,10 @@ class RunCommandResult(Model): 'reason': {'key': 'properties.reason', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(RunCommandResult, self).__init__(**kwargs) self.id = None self.provisioning_state = None @@ -3064,13 +3373,12 @@ def __init__(self, **kwargs): self.reason = None -class SysctlConfig(Model): +class SysctlConfig(msrest.serialization.Model): """Sysctl settings for Linux agent nodes. :param net_core_somaxconn: Sysctl setting net.core.somaxconn. :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. + :param net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. :type net_core_netdev_max_backlog: int :param net_core_rmem_default: Sysctl setting net.core.rmem_default. :type net_core_rmem_default: int @@ -3082,45 +3390,33 @@ class SysctlConfig(Model): :type net_core_wmem_max: int :param net_core_optmem_max: Sysctl setting net.core.optmem_max. :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. + :param net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. + :param net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. :type net_ipv4_tcp_max_tw_buckets: int :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. + :param net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. + :param net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. + :param net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. :type net_ipv4_tcpkeepalive_intvl: int :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. + :param net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. + :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. + :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. + :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. + :param net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. + :param net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. + :param fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. :type fs_inotify_max_user_watches: int :param fs_file_max: Sysctl setting fs.file-max. :type fs_file_max: int @@ -3169,7 +3465,10 @@ class SysctlConfig(Model): 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SysctlConfig, self).__init__(**kwargs) self.net_core_somaxconn = kwargs.get('net_core_somaxconn', None) self.net_core_netdev_max_backlog = kwargs.get('net_core_netdev_max_backlog', None) @@ -3201,27 +3500,24 @@ def __init__(self, **kwargs): self.vm_vfs_cache_pressure = kwargs.get('vm_vfs_cache_pressure', None) -class SystemData(Model): +class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. :param created_by: The identity that created the resource. :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.CreatedByType + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.CreatedByType :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime + :type created_at: ~datetime.datetime :param last_modified_by: The identity that last modified the resource. :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". :type last_modified_by_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: datetime + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime """ _attribute_map = { @@ -3233,7 +3529,10 @@ class SystemData(Model): 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SystemData, self).__init__(**kwargs) self.created_by = kwargs.get('created_by', None) self.created_by_type = kwargs.get('created_by_type', None) @@ -3243,10 +3542,10 @@ def __init__(self, **kwargs): self.last_modified_at = kwargs.get('last_modified_at', None) -class TagsObject(Model): +class TagsObject(msrest.serialization.Model): """Tags object for patch operations. - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -3254,16 +3553,19 @@ class TagsObject(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TagsObject, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) -class TimeInWeek(Model): +class TimeInWeek(msrest.serialization.Model): """Time in a week. - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + :param day: A day in a week. Possible values include: "Sunday", "Monday", "Tuesday", + "Wednesday", "Thursday", "Friday", "Saturday". :type day: str or ~azure.mgmt.containerservice.v2021_05_01.models.WeekDay :param hour_slots: hour slots in a day. :type hour_slots: list[int] @@ -3274,19 +3576,22 @@ class TimeInWeek(Model): 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TimeInWeek, self).__init__(**kwargs) self.day = kwargs.get('day', None) self.hour_slots = kwargs.get('hour_slots', None) -class TimeSpan(Model): +class TimeSpan(msrest.serialization.Model): """The time span with start and end properties. - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime + :param start: The start of a time span. + :type start: ~datetime.datetime + :param end: The end of a time span. + :type end: ~datetime.datetime """ _attribute_map = { @@ -3294,7 +3599,10 @@ class TimeSpan(Model): 'end': {'key': 'end', 'type': 'iso-8601'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TimeSpan, self).__init__(**kwargs) self.start = kwargs.get('start', None) self.end = kwargs.get('end', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models_py3.py old mode 100644 new mode 100755 index aeaae816e3e..db1b9190e9b --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models_py3.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models_py3.py @@ -1,30 +1,30 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError +import datetime +from typing import Dict, List, Optional, Union +import msrest.serialization -class SubResource(Model): +from ._container_service_client_enums import * + + +class SubResource(msrest.serialization.Model): """Reference to another subresource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str """ @@ -40,7 +40,10 @@ class SubResource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(SubResource, self).__init__(**kwargs) self.id = None self.name = None @@ -50,139 +53,120 @@ def __init__(self, **kwargs) -> None: class AgentPool(SubResource): """Agent Pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 1000 (inclusive) for user pools and in - the range of 1 to 1000 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. :type count: int :param vm_size: Size of agent VMs. :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param os_sku: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner + for Linux OSType. Not applicable to Windows OSType. Possible values include: "Ubuntu", + "CBLMariner". :type os_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or + :param type_properties_type: AgentPoolType represents types of an agent pool. Possible values + include: "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. + :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs assigned from this + Public IP Prefix. :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param enable_ultra_ssd: Whether to enable UltraSSD + :param enable_ultra_ssd: Whether to enable UltraSSD. :type enable_ultra_ssd: bool - :param enable_fips: Whether to use FIPS enabled OS + :param enable_fips: Whether to use FIPS enabled OS. :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible + values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". :type gpu_instance_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.GPUInstanceProfile """ @@ -191,6 +175,7 @@ class AgentPool(SubResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -213,7 +198,7 @@ class AgentPool(SubResource): 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, 'min_count': {'key': 'properties.minCount', 'type': 'int'}, 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, 'mode': {'key': 'properties.mode', 'type': 'str'}, 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, @@ -238,7 +223,44 @@ class AgentPool(SubResource): 'gpu_instance_profile': {'key': 'properties.gpuInstanceProfile', 'type': 'str'}, } - def __init__(self, *, count: int=None, vm_size: str=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", os_sku=None, max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, enable_ultra_ssd: bool=None, enable_fips: bool=None, gpu_instance_profile=None, **kwargs) -> None: + def __init__( + self, + *, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + os_sku: Optional[Union[str, "OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type_properties_type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "GPUInstanceProfile"]] = None, + **kwargs + ): super(AgentPool, self).__init__(**kwargs) self.count = count self.vm_size = vm_size @@ -253,7 +275,7 @@ def __init__(self, *, count: int=None, vm_size: str=None, os_disk_size_gb: int=N self.max_count = max_count self.min_count = min_count self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type + self.type_properties_type = type_properties_type self.mode = mode self.orchestrator_version = orchestrator_version self.node_image_version = None @@ -278,11 +300,10 @@ def __init__(self, *, count: int=None, vm_size: str=None, os_disk_size_gb: int=N self.gpu_instance_profile = gpu_instance_profile -class AgentPoolAvailableVersions(Model): +class AgentPoolAvailableVersions(msrest.serialization.Model): """The list of available versions for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Id of the agent pool available versions. :vartype id: str @@ -308,7 +329,12 @@ class AgentPoolAvailableVersions(Model): 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, } - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: + def __init__( + self, + *, + agent_pool_versions: Optional[List["AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, + **kwargs + ): super(AgentPoolAvailableVersions, self).__init__(**kwargs) self.id = None self.name = None @@ -316,7 +342,7 @@ def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: self.agent_pool_versions = agent_pool_versions -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): +class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(msrest.serialization.Model): """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. :param default: Whether this version is the default agent pool version. @@ -333,18 +359,55 @@ class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: + def __init__( + self, + *, + default: Optional[bool] = None, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) self.default = default self.kubernetes_version = kubernetes_version self.is_preview = is_preview -class AgentPoolUpgradeProfile(Model): +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AgentPool"]] = None, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AgentPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -354,20 +417,16 @@ class AgentPoolUpgradeProfile(Model): :vartype name: str :ivar type: Type of the agent pool upgrade profile. :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. + :param latest_node_image_version: LatestNodeImageVersion is the latest AKS supported node image + version. :type latest_node_image_version: str """ @@ -389,7 +448,15 @@ class AgentPoolUpgradeProfile(Model): 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, } - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "OSType"] = "Linux", + upgrades: Optional[List["AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, + latest_node_image_version: Optional[str] = None, + **kwargs + ): super(AgentPoolUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None @@ -400,7 +467,7 @@ def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, l self.latest_node_image_version = latest_node_image_version -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): +class AgentPoolUpgradeProfilePropertiesUpgradesItem(msrest.serialization.Model): """AgentPoolUpgradeProfilePropertiesUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -414,17 +481,23 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kubernetes_version self.is_preview = is_preview -class AgentPoolUpgradeSettings(Model): +class AgentPoolUpgradeSettings(msrest.serialization.Model): """Settings for upgrading an agentpool. - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default + :param max_surge: Count or percentage of additional nodes to be added during upgrade. If empty + uses AKS default. :type max_surge: str """ @@ -432,55 +505,51 @@ class AgentPoolUpgradeSettings(Model): 'max_surge': {'key': 'maxSurge', 'type': 'str'}, } - def __init__(self, *, max_surge: str=None, **kwargs) -> None: + def __init__( + self, + *, + max_surge: Optional[str] = None, + **kwargs + ): super(AgentPoolUpgradeSettings, self).__init__(**kwargs) self.max_surge = max_surge -class CloudError(Model): +class CloudError(msrest.serialization.Model): """An error response from the Container service. :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody + :type error: ~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody """ _attribute_map = { 'error': {'key': 'error', 'type': 'CloudErrorBody'}, } - def __init__(self, *, error=None, **kwargs) -> None: + def __init__( + self, + *, + error: Optional["CloudErrorBody"] = None, + **kwargs + ): super(CloudError, self).__init__(**kwargs) self.error = error -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): +class CloudErrorBody(msrest.serialization.Model): """An error response from the Container service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: A message describing the error, intended to be suitable for display in a user + interface. :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. + :param target: The target of the particular error. For example, the name of the property in + error. :type target: str :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody] + :type details: list[~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody] """ _attribute_map = { @@ -490,7 +559,15 @@ class CloudErrorBody(Model): 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, } - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["CloudErrorBody"]] = None, + **kwargs + ): super(CloudErrorBody, self).__init__(**kwargs) self.code = code self.message = message @@ -498,13 +575,287 @@ def __init__(self, *, code: str=None, message: str=None, target: str=None, detai self.details = details -class ContainerServiceDiagnosticsProfile(Model): +class Components1Q1Og48SchemasManagedclusterAllof1(msrest.serialization.Model): + """Components1Q1Og48SchemasManagedclusterAllof1. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :param fqdn_subdomain: FQDN subdomain specified when creating private cluster with custom + private dns zone. + :type fqdn_subdomain: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :ivar private_fqdn: FQDN of private cluster. + :vartype private_fqdn: str + :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy config. + :vartype azure_portal_fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAddonProfile] + :param pod_identity_profile: Profile of managed cluster pod identity. + :type pod_identity_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityProfile + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile + :param auto_upgrade_profile: Profile of auto upgrade configuration. + :type auto_upgrade_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAutoUpgradeProfile + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :type auto_scaler_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPropertiesAutoScalerProfile + :param api_server_access_profile: Access profile for managed cluster API server. + :type api_server_access_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAPIServerAccessProfile + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. + :type disk_encryption_set_id: str + :param identity_profile: Identities associated with the cluster. + :type identity_profile: dict[str, + ~azure.mgmt.containerservice.v2021_05_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + :param private_link_resources: Private link resources associated with the cluster. + :type private_link_resources: + list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] + :param disable_local_accounts: If set to true, getting static credential will be disabled for + this cluster. Expected to only be used for AAD clusters. + :type disable_local_accounts: bool + :param http_proxy_config: Configurations for provisioning the cluster with HTTP proxy servers. + :type http_proxy_config: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterHTTPProxyConfig + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'private_fqdn': {'readonly': True}, + 'azure_portal_fqdn': {'readonly': True}, + } + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn_subdomain': {'key': 'properties.fqdnSubdomain', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, + 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, + 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, + 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, + 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + 'private_link_resources': {'key': 'properties.privateLinkResources', 'type': '[PrivateLinkResource]'}, + 'disable_local_accounts': {'key': 'properties.disableLocalAccounts', 'type': 'bool'}, + 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'ManagedClusterHTTPProxyConfig'}, + } + + def __init__( + self, + *, + identity: Optional["ManagedClusterIdentity"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + fqdn_subdomain: Optional[str] = None, + agent_pool_profiles: Optional[List["ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "ManagedClusterAddonProfile"]] = None, + pod_identity_profile: Optional["ManagedClusterPodIdentityProfile"] = None, + node_resource_group: Optional[str] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + network_profile: Optional["ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["ManagedClusterAADProfile"] = None, + auto_upgrade_profile: Optional["ManagedClusterAutoUpgradeProfile"] = None, + auto_scaler_profile: Optional["ManagedClusterPropertiesAutoScalerProfile"] = None, + api_server_access_profile: Optional["ManagedClusterAPIServerAccessProfile"] = None, + disk_encryption_set_id: Optional[str] = None, + identity_profile: Optional[Dict[str, "ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties"]] = None, + private_link_resources: Optional[List["PrivateLinkResource"]] = None, + disable_local_accounts: Optional[bool] = None, + http_proxy_config: Optional["ManagedClusterHTTPProxyConfig"] = None, + **kwargs + ): + super(Components1Q1Og48SchemasManagedclusterAllof1, self).__init__(**kwargs) + self.identity = identity + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kubernetes_version + self.dns_prefix = dns_prefix + self.fqdn_subdomain = fqdn_subdomain + self.fqdn = None + self.private_fqdn = None + self.azure_portal_fqdn = None + self.agent_pool_profiles = agent_pool_profiles + self.linux_profile = linux_profile + self.windows_profile = windows_profile + self.service_principal_profile = service_principal_profile + self.addon_profiles = addon_profiles + self.pod_identity_profile = pod_identity_profile + self.node_resource_group = node_resource_group + self.enable_rbac = enable_rbac + self.enable_pod_security_policy = enable_pod_security_policy + self.network_profile = network_profile + self.aad_profile = aad_profile + self.auto_upgrade_profile = auto_upgrade_profile + self.auto_scaler_profile = auto_scaler_profile + self.api_server_access_profile = api_server_access_profile + self.disk_encryption_set_id = disk_encryption_set_id + self.identity_profile = identity_profile + self.private_link_resources = private_link_resources + self.disable_local_accounts = disable_local_accounts + self.http_proxy_config = http_proxy_config + + +class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedIdentity(msrest.serialization.Model): + """UserAssignedIdentity. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.resource_id = resource_id + self.client_id = client_id + self.object_id = object_id + + +class ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties(UserAssignedIdentity): + """ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): + super(ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): """Profile for diagnostics on the container service cluster. All required parameters must be populated in order to send to Azure. - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. :type vm_diagnostics: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceVMDiagnostics """ @@ -517,23 +868,25 @@ class ContainerServiceDiagnosticsProfile(Model): 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, } - def __init__(self, *, vm_diagnostics, **kwargs) -> None: + def __init__( + self, + *, + vm_diagnostics: "ContainerServiceVMDiagnostics", + **kwargs + ): super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) self.vm_diagnostics = vm_diagnostics -class ContainerServiceLinuxProfile(Model): +class ContainerServiceLinuxProfile(msrest.serialization.Model): """Profile for Linux VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. The administrator username to use for - Linux VMs. + :param admin_username: Required. The administrator username to use for Linux VMs. :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceSshConfiguration + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceSshConfiguration """ _validation = { @@ -546,93 +899,82 @@ class ContainerServiceLinuxProfile(Model): 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, } - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: + def __init__( + self, + *, + admin_username: str, + ssh: "ContainerServiceSshConfiguration", + **kwargs + ): super(ContainerServiceLinuxProfile, self).__init__(**kwargs) self.admin_username = admin_username self.ssh = ssh -class ContainerServiceMasterProfile(Model): +class ContainerServiceMasterProfile(msrest.serialization.Model): """Profile for the container service master. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2021_05_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". :type storage_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceStorageProfileTypes :ivar fqdn: FQDN for the master pool. @@ -642,6 +984,7 @@ class ContainerServiceMasterProfile(Model): _validation = { 'dns_prefix': {'required': True}, 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'fqdn': {'readonly': True}, } @@ -656,7 +999,18 @@ class ContainerServiceMasterProfile(Model): 'fqdn': {'key': 'fqdn', 'type': 'str'}, } - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: + def __init__( + self, + *, + dns_prefix: str, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + count: Optional[Union[int, "Count"]] = "1", + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + first_consecutive_static_ip: Optional[str] = "10.240.255.5", + storage_profile: Optional[Union[str, "ContainerServiceStorageProfileTypes"]] = None, + **kwargs + ): super(ContainerServiceMasterProfile, self).__init__(**kwargs) self.count = count self.dns_prefix = dns_prefix @@ -668,46 +1022,35 @@ def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: i self.fqdn = None -class ContainerServiceNetworkProfile(Model): +class ContainerServiceNetworkProfile(msrest.serialization.Model): """Profile of network configuration. - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . + :param network_plugin: Network plugin used for building Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPolicy + :param network_mode: Network mode used for building Kubernetes network. Possible values + include: "transparent", "bridge". + :type network_mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.NetworkMode + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2021_05_01.models.LoadBalancerSku + :param outbound_type: The outbound (egress) routing method. Possible values include: + "loadBalancer", "userDefinedRouting". Default value: "loadBalancer". + :type outbound_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OutboundType + :param load_balancer_sku: The load balancer sku for the managed cluster. Possible values + include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.LoadBalancerSku :param load_balancer_profile: Profile of the cluster load balancer. :type load_balancer_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfile @@ -733,7 +1076,21 @@ class ContainerServiceNetworkProfile(Model): 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, } - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: + def __init__( + self, + *, + network_plugin: Optional[Union[str, "NetworkPlugin"]] = "kubenet", + network_policy: Optional[Union[str, "NetworkPolicy"]] = None, + network_mode: Optional[Union[str, "NetworkMode"]] = None, + pod_cidr: Optional[str] = "10.244.0.0/16", + service_cidr: Optional[str] = "10.0.0.0/16", + dns_service_ip: Optional[str] = "10.0.0.10", + docker_bridge_cidr: Optional[str] = "172.17.0.1/16", + outbound_type: Optional[Union[str, "OutboundType"]] = "loadBalancer", + load_balancer_sku: Optional[Union[str, "LoadBalancerSku"]] = None, + load_balancer_profile: Optional["ManagedClusterLoadBalancerProfile"] = None, + **kwargs + ): super(ContainerServiceNetworkProfile, self).__init__(**kwargs) self.network_plugin = network_plugin self.network_policy = network_policy @@ -747,13 +1104,13 @@ def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mod self.load_balancer_profile = load_balancer_profile -class ContainerServiceSshConfiguration(Model): +class ContainerServiceSshConfiguration(msrest.serialization.Model): """SSH configuration for Linux-based VMs running on Azure. All required parameters must be populated in order to send to Azure. - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. :type public_keys: list[~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceSshPublicKey] """ @@ -766,19 +1123,23 @@ class ContainerServiceSshConfiguration(Model): 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, } - def __init__(self, *, public_keys, **kwargs) -> None: + def __init__( + self, + *, + public_keys: List["ContainerServiceSshPublicKey"], + **kwargs + ): super(ContainerServiceSshConfiguration, self).__init__(**kwargs) self.public_keys = public_keys -class ContainerServiceSshPublicKey(Model): +class ContainerServiceSshPublicKey(msrest.serialization.Model): """Contains information about SSH certificate public key data. All required parameters must be populated in order to send to Azure. - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. :type key_data: str """ @@ -790,24 +1151,26 @@ class ContainerServiceSshPublicKey(Model): 'key_data': {'key': 'keyData', 'type': 'str'}, } - def __init__(self, *, key_data: str, **kwargs) -> None: + def __init__( + self, + *, + key_data: str, + **kwargs + ): super(ContainerServiceSshPublicKey, self).__init__(**kwargs) self.key_data = key_data -class ContainerServiceVMDiagnostics(Model): +class ContainerServiceVMDiagnostics(msrest.serialization.Model): """Profile for diagnostics on the container service VMs. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. + :ivar storage_uri: The URI of the storage account where diagnostics are stored. :vartype storage_uri: str """ @@ -821,17 +1184,21 @@ class ContainerServiceVMDiagnostics(Model): 'storage_uri': {'key': 'storageUri', 'type': 'str'}, } - def __init__(self, *, enabled: bool, **kwargs) -> None: + def __init__( + self, + *, + enabled: bool, + **kwargs + ): super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) self.enabled = enabled self.storage_uri = None -class CredentialResult(Model): +class CredentialResult(msrest.serialization.Model): """The credential result response. - Variables are only populated by the server, and will be ignored when - sending a request. + 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 @@ -849,21 +1216,22 @@ class CredentialResult(Model): 'value': {'key': 'value', 'type': 'bytearray'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(CredentialResult, self).__init__(**kwargs) self.name = None self.value = None -class CredentialResults(Model): +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. + Variables are only populated by the server, and will be ignored when sending a request. :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2021_05_01.models.CredentialResult] + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2021_05_01.models.CredentialResult] """ _validation = { @@ -874,20 +1242,21 @@ class CredentialResults(Model): 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(CredentialResults, self).__init__(**kwargs) self.kubeconfigs = None -class EndpointDependency(Model): +class EndpointDependency(msrest.serialization.Model): """A domain name that AKS agent nodes are reaching at. :param domain_name: The domain name of the dependency. :type domain_name: str - :param endpoint_details: The Ports and Protocols used when connecting to - domainName. - :type endpoint_details: - list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDetail] + :param endpoint_details: The Ports and Protocols used when connecting to domainName. + :type endpoint_details: list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDetail] """ _attribute_map = { @@ -895,22 +1264,28 @@ class EndpointDependency(Model): 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, } - def __init__(self, *, domain_name: str=None, endpoint_details=None, **kwargs) -> None: + def __init__( + self, + *, + domain_name: Optional[str] = None, + endpoint_details: Optional[List["EndpointDetail"]] = None, + **kwargs + ): super(EndpointDependency, self).__init__(**kwargs) self.domain_name = domain_name self.endpoint_details = endpoint_details -class EndpointDetail(Model): +class EndpointDetail(msrest.serialization.Model): """connect information from the AKS agent nodes to a single endpoint. :param ip_address: An IP Address that Domain Name currently resolves to. :type ip_address: str :param port: The port an endpoint is connected to. :type port: int - :param protocol: The protocol used for connection + :param protocol: The protocol used for connection. :type protocol: str - :param description: Description of the detail + :param description: Description of the detail. :type description: str """ @@ -921,7 +1296,15 @@ class EndpointDetail(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, *, ip_address: str=None, port: int=None, protocol: str=None, description: str=None, **kwargs) -> None: + def __init__( + self, + *, + ip_address: Optional[str] = None, + port: Optional[int] = None, + protocol: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): super(EndpointDetail, self).__init__(**kwargs) self.ip_address = ip_address self.port = port @@ -929,15 +1312,13 @@ def __init__(self, *, ip_address: str=None, port: int=None, protocol: str=None, self.description = description -class ExtendedLocation(Model): +class ExtendedLocation(msrest.serialization.Model): """The complex type of the extended location. :param name: The name of the extended location. :type name: str - :param type: The type of the extended location. Possible values include: - 'EdgeZone' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocationTypes + :param type: The type of the extended location. Possible values include: "EdgeZone". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocationTypes """ _attribute_map = { @@ -945,41 +1326,46 @@ class ExtendedLocation(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, name: str=None, type=None, **kwargs) -> None: + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[Union[str, "ExtendedLocationTypes"]] = None, + **kwargs + ): super(ExtendedLocation, self).__init__(**kwargs) self.name = name self.type = type -class KubeletConfig(Model): +class KubeletConfig(msrest.serialization.Model): """Kubelet configurations of agent nodes. :param cpu_manager_policy: CPU Manager policy to use. :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. + :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that specify CPU limits. :type cpu_cfs_quota: bool :param cpu_cfs_quota_period: Sets CPU CFS quota period value. :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. + :param image_gc_high_threshold: The percent of disk usage after which image garbage collection + is always run. :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. + :param image_gc_low_threshold: The percent of disk usage before which image garbage collection + is never run. :type image_gc_low_threshold: int :param topology_manager_policy: Topology Manager policy to use. :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). + :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe sysctl patterns (ending in + ``*``\ ). :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. + :param fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled + on the node. :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. + :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before it + is rotated. :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. + :param container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. :type container_log_max_files: int :param pod_max_pids: The maximum number of processes per pod. :type pod_max_pids: int @@ -1003,7 +1389,22 @@ class KubeletConfig(Model): 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, } - def __init__(self, *, cpu_manager_policy: str=None, cpu_cfs_quota: bool=None, cpu_cfs_quota_period: str=None, image_gc_high_threshold: int=None, image_gc_low_threshold: int=None, topology_manager_policy: str=None, allowed_unsafe_sysctls=None, fail_swap_on: bool=None, container_log_max_size_mb: int=None, container_log_max_files: int=None, pod_max_pids: int=None, **kwargs) -> None: + def __init__( + self, + *, + cpu_manager_policy: Optional[str] = None, + cpu_cfs_quota: Optional[bool] = None, + cpu_cfs_quota_period: Optional[str] = None, + image_gc_high_threshold: Optional[int] = None, + image_gc_low_threshold: Optional[int] = None, + topology_manager_policy: Optional[str] = None, + allowed_unsafe_sysctls: Optional[List[str]] = None, + fail_swap_on: Optional[bool] = None, + container_log_max_size_mb: Optional[int] = None, + container_log_max_files: Optional[int] = None, + pod_max_pids: Optional[int] = None, + **kwargs + ): super(KubeletConfig, self).__init__(**kwargs) self.cpu_manager_policy = cpu_manager_policy self.cpu_cfs_quota = cpu_cfs_quota @@ -1018,20 +1419,17 @@ def __init__(self, *, cpu_manager_policy: str=None, cpu_cfs_quota: bool=None, cp self.pod_max_pids = pod_max_pids -class LinuxOSConfig(Model): +class LinuxOSConfig(msrest.serialization.Model): """OS configurations of Linux agent nodes. :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2021_05_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. + :type sysctls: ~azure.mgmt.containerservice.v2021_05_01.models.SysctlConfig + :param transparent_huge_page_enabled: Transparent Huge Page enabled configuration. :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. + :param transparent_huge_page_defrag: Transparent Huge Page defrag configuration. :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. + :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap file will be created on + each node. :type swap_file_size_mb: int """ @@ -1042,7 +1440,15 @@ class LinuxOSConfig(Model): 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, } - def __init__(self, *, sysctls=None, transparent_huge_page_enabled: str=None, transparent_huge_page_defrag: str=None, swap_file_size_mb: int=None, **kwargs) -> None: + def __init__( + self, + *, + sysctls: Optional["SysctlConfig"] = None, + transparent_huge_page_enabled: Optional[str] = None, + transparent_huge_page_defrag: Optional[str] = None, + swap_file_size_mb: Optional[int] = None, + **kwargs + ): super(LinuxOSConfig, self).__init__(**kwargs) self.sysctls = sysctls self.transparent_huge_page_enabled = transparent_huge_page_enabled @@ -1053,25 +1459,21 @@ def __init__(self, *, sysctls=None, transparent_huge_page_enabled: str=None, tra class MaintenanceConfiguration(SubResource): """maintenance configuration. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2021_05_01.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2021_05_01.models.SystemData :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_05_01.models.TimeInWeek] + :type time_in_week: list[~azure.mgmt.containerservice.v2021_05_01.models.TimeInWeek] :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_05_01.models.TimeSpan] + :type not_allowed_time: list[~azure.mgmt.containerservice.v2021_05_01.models.TimeSpan] """ _validation = { @@ -1090,30 +1492,66 @@ class MaintenanceConfiguration(SubResource): 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, } - def __init__(self, *, time_in_week=None, not_allowed_time=None, **kwargs) -> None: + def __init__( + self, + *, + time_in_week: Optional[List["TimeInWeek"]] = None, + not_allowed_time: Optional[List["TimeSpan"]] = None, + **kwargs + ): super(MaintenanceConfiguration, self).__init__(**kwargs) self.system_data = None self.time_in_week = time_in_week self.not_allowed_time = not_allowed_time -class Resource(Model): +class MaintenanceConfigurationListResult(msrest.serialization.Model): + """The response from the List maintenance configurations operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of maintenance configurations. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration] + :ivar next_link: The URL to get the next set of maintenance configuration results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MaintenanceConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["MaintenanceConfiguration"]] = None, + **kwargs + ): + super(MaintenanceConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class Resource(msrest.serialization.Model): """The Resource model definition. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -1132,7 +1570,13 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, location: str, tags=None, **kwargs) -> None: + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -1141,61 +1585,46 @@ def __init__(self, *, location: str, tags=None, **kwargs) -> None: self.tags = tags -class ManagedCluster(Resource): +class ManagedCluster(Resource, Components1Q1Og48SchemasManagedclusterAllof1): """Managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. :type kubernetes_version: str :param dns_prefix: DNS prefix specified when creating the managed cluster. :type dns_prefix: str - :param fqdn_subdomain: FQDN subdomain specified when creating private - cluster with custom private dns zone. + :param fqdn_subdomain: FQDN subdomain specified when creating private cluster with custom + private dns zone. :type fqdn_subdomain: str :ivar fqdn: FQDN for the master pool. :vartype fqdn: str :ivar private_fqdn: FQDN of private cluster. :vartype private_fqdn: str - :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy - config. + :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy config. :vartype azure_portal_fqdn: str :param agent_pool_profiles: Properties of the agent pool. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. + :param linux_profile: Profile for Linux VMs in the container service cluster. :type linux_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. + :param windows_profile: Profile for Windows VMs in the container service cluster. :type windows_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. :type service_principal_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterServicePrincipalProfile :param addon_profiles: Profile of managed cluster add-on. @@ -1204,81 +1633,74 @@ class ManagedCluster(Resource): :param pod_identity_profile: Profile of managed cluster pod identity. :type pod_identity_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. + :param node_resource_group: Name of the resource group containing agent pool nodes. :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. :type enable_pod_security_policy: bool :param network_profile: Profile of network configuration. :type network_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceNetworkProfile :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile + :type aad_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile :param auto_upgrade_profile: Profile of auto upgrade configuration. :type auto_upgrade_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. :type auto_scaler_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. + :param api_server_access_profile: Access profile for managed cluster API server. :type api_server_access_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. :type disk_encryption_set_id: str :param identity_profile: Identities associated with the cluster. :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param private_link_resources: Private link resources associated with the - cluster. + ~azure.mgmt.containerservice.v2021_05_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + :param private_link_resources: Private link resources associated with the cluster. :type private_link_resources: list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] - :param disable_local_accounts: If set to true, getting static credential - will be disabled for this cluster. Expected to only be used for AAD - clusters. + :param disable_local_accounts: If set to true, getting static credential will be disabled for + this cluster. Expected to only be used for AAD clusters. :type disable_local_accounts: bool - :param http_proxy_config: Configurations for provisioning the cluster with - HTTP proxy servers. + :param http_proxy_config: Configurations for provisioning the cluster with HTTP proxy servers. :type http_proxy_config: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterHTTPProxyConfig - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentity + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKU + :type sku: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKU :param extended_location: The extended location of the Virtual Machine. - :type extended_location: - ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocation + :type extended_location: ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocation """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, 'max_agent_pools': {'readonly': True}, 'fqdn': {'readonly': True}, 'private_fqdn': {'readonly': True}, 'azure_portal_fqdn': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, @@ -1303,17 +1725,53 @@ class ManagedCluster(Resource): 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, 'private_link_resources': {'key': 'properties.privateLinkResources', 'type': '[PrivateLinkResource]'}, 'disable_local_accounts': {'key': 'properties.disableLocalAccounts', 'type': 'bool'}, 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'ManagedClusterHTTPProxyConfig'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, } - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, fqdn_subdomain: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, pod_identity_profile=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_upgrade_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, private_link_resources=None, disable_local_accounts: bool=None, http_proxy_config=None, identity=None, sku=None, extended_location=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) + def __init__( + self, + *, + location: str, + identity: Optional["ManagedClusterIdentity"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + fqdn_subdomain: Optional[str] = None, + agent_pool_profiles: Optional[List["ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "ManagedClusterAddonProfile"]] = None, + pod_identity_profile: Optional["ManagedClusterPodIdentityProfile"] = None, + node_resource_group: Optional[str] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + network_profile: Optional["ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["ManagedClusterAADProfile"] = None, + auto_upgrade_profile: Optional["ManagedClusterAutoUpgradeProfile"] = None, + auto_scaler_profile: Optional["ManagedClusterPropertiesAutoScalerProfile"] = None, + api_server_access_profile: Optional["ManagedClusterAPIServerAccessProfile"] = None, + disk_encryption_set_id: Optional[str] = None, + identity_profile: Optional[Dict[str, "ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties"]] = None, + private_link_resources: Optional[List["PrivateLinkResource"]] = None, + disable_local_accounts: Optional[bool] = None, + http_proxy_config: Optional["ManagedClusterHTTPProxyConfig"] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["ManagedClusterSKU"] = None, + extended_location: Optional["ExtendedLocation"] = None, + **kwargs + ): + super(ManagedCluster, self).__init__(location=location, tags=tags, identity=identity, kubernetes_version=kubernetes_version, dns_prefix=dns_prefix, fqdn_subdomain=fqdn_subdomain, agent_pool_profiles=agent_pool_profiles, linux_profile=linux_profile, windows_profile=windows_profile, service_principal_profile=service_principal_profile, addon_profiles=addon_profiles, pod_identity_profile=pod_identity_profile, node_resource_group=node_resource_group, enable_rbac=enable_rbac, enable_pod_security_policy=enable_pod_security_policy, network_profile=network_profile, aad_profile=aad_profile, auto_upgrade_profile=auto_upgrade_profile, auto_scaler_profile=auto_scaler_profile, api_server_access_profile=api_server_access_profile, disk_encryption_set_id=disk_encryption_set_id, identity_profile=identity_profile, private_link_resources=private_link_resources, disable_local_accounts=disable_local_accounts, http_proxy_config=http_proxy_config, **kwargs) + self.identity = identity self.provisioning_state = None self.power_state = None self.max_agent_pools = None @@ -1342,48 +1800,63 @@ def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dn self.private_link_resources = private_link_resources self.disable_local_accounts = disable_local_accounts self.http_proxy_config = http_proxy_config - self.identity = identity + self.sku = sku + self.extended_location = extended_location + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags self.sku = sku self.extended_location = extended_location -class ManagedClusterAADProfile(Model): +class ManagedClusterAADProfile(msrest.serialization.Model): """AADProfile specifies attributes for Azure Active Directory integration. :param managed: Whether to enable managed AAD. :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. + :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] + :param admin_group_object_i_ds: AAD group object IDs that will have admin role of the cluster. + :type admin_group_object_i_ds: list[str] :param client_app_id: The client AAD application ID. :type client_app_id: str :param server_app_id: The server AAD application ID. :type server_app_id: str :param server_app_secret: The server AAD application secret. :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. :type tenant_id: str """ _attribute_map = { 'managed': {'key': 'managed', 'type': 'bool'}, 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, + 'admin_group_object_i_ds': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, 'tenant_id': {'key': 'tenantID', 'type': 'str'}, } - def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: + def __init__( + self, + *, + managed: Optional[bool] = None, + enable_azure_rbac: Optional[bool] = None, + admin_group_object_i_ds: Optional[List[str]] = None, + client_app_id: Optional[str] = None, + server_app_id: Optional[str] = None, + server_app_secret: Optional[str] = None, + tenant_id: Optional[str] = None, + **kwargs + ): super(ManagedClusterAADProfile, self).__init__(**kwargs) self.managed = managed self.enable_azure_rbac = enable_azure_rbac - self.admin_group_object_ids = admin_group_object_ids + self.admin_group_object_i_ds = admin_group_object_i_ds self.client_app_id = client_app_id self.server_app_id = server_app_id self.server_app_secret = server_app_secret @@ -1393,20 +1866,19 @@ def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_gr class ManagedClusterAccessProfile(Resource): """Managed cluster Access Profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param kube_config: Base64-encoded Kubernetes configuration file. :type kube_config: bytearray @@ -1428,16 +1900,22 @@ class ManagedClusterAccessProfile(Resource): 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, } - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytearray] = None, + **kwargs + ): super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) self.kube_config = kube_config -class ManagedClusterAddonProfile(Model): +class ManagedClusterAddonProfile(msrest.serialization.Model): """A Kubernetes add-on profile for a managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -1461,37 +1939,19 @@ class ManagedClusterAddonProfile(Model): 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, } - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: + def __init__( + self, + *, + enabled: bool, + config: Optional[Dict[str, str]] = None, + **kwargs + ): super(ManagedClusterAddonProfile, self).__init__(**kwargs) self.enabled = enabled self.config = config self.identity = None -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): """Information of user assigned identity used by this add-on. @@ -1509,144 +1969,132 @@ class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): 'object_id': {'key': 'objectId', 'type': 'str'}, } - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) -class ManagedClusterAgentPoolProfileProperties(Model): +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): """Properties for the container service agent pool profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 1000 (inclusive) for user pools and in - the range of 1 to 1000 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. :type count: int :param vm_size: Size of agent VMs. :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param os_sku: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner + for Linux OSType. Not applicable to Windows OSType. Possible values include: "Ubuntu", + "CBLMariner". :type os_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. + :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs assigned from this + Public IP Prefix. :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param enable_ultra_ssd: Whether to enable UltraSSD + :param enable_ultra_ssd: Whether to enable UltraSSD. :type enable_ultra_ssd: bool - :param enable_fips: Whether to use FIPS enabled OS + :param enable_fips: Whether to use FIPS enabled OS. :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible + values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". :type gpu_instance_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.GPUInstanceProfile """ _validation = { + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1691,7 +2139,44 @@ class ManagedClusterAgentPoolProfileProperties(Model): 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, } - def __init__(self, *, count: int=None, vm_size: str=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", os_sku=None, max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, enable_ultra_ssd: bool=None, enable_fips: bool=None, gpu_instance_profile=None, **kwargs) -> None: + def __init__( + self, + *, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + os_sku: Optional[Union[str, "OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "GPUInstanceProfile"]] = None, + **kwargs + ): super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) self.count = count self.vm_size = vm_size @@ -1734,142 +2219,123 @@ def __init__(self, *, count: int=None, vm_size: str=None, os_disk_size_gb: int=N class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): """Profile for the container service agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 1000 (inclusive) for user pools and in - the range of 1 to 1000 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. :type count: int :param vm_size: Size of agent VMs. :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param os_sku: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner + for Linux OSType. Not applicable to Windows OSType. Possible values include: "Ubuntu", + "CBLMariner". :type os_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. + :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs assigned from this + Public IP Prefix. :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param enable_ultra_ssd: Whether to enable UltraSSD + :param enable_ultra_ssd: Whether to enable UltraSSD. :type enable_ultra_ssd: bool - :param enable_fips: Whether to use FIPS enabled OS + :param enable_fips: Whether to use FIPS enabled OS. :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible + values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". :type gpu_instance_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.GPUInstanceProfile - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. :type name: str """ _validation = { + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1916,24 +2382,60 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, *, name: str, count: int=None, vm_size: str=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", os_sku=None, max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, enable_ultra_ssd: bool=None, enable_fips: bool=None, gpu_instance_profile=None, **kwargs) -> None: + def __init__( + self, + *, + name: str, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + os_sku: Optional[Union[str, "OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "GPUInstanceProfile"]] = None, + **kwargs + ): super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, os_disk_type=os_disk_type, kubelet_disk_type=kubelet_disk_type, vnet_subnet_id=vnet_subnet_id, pod_subnet_id=pod_subnet_id, max_pods=max_pods, os_type=os_type, os_sku=os_sku, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, node_public_ip_prefix_id=node_public_ip_prefix_id, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, kubelet_config=kubelet_config, linux_os_config=linux_os_config, enable_encryption_at_host=enable_encryption_at_host, enable_ultra_ssd=enable_ultra_ssd, enable_fips=enable_fips, gpu_instance_profile=gpu_instance_profile, **kwargs) self.name = name -class ManagedClusterAPIServerAccessProfile(Model): +class ManagedClusterAPIServerAccessProfile(msrest.serialization.Model): """Access profile for managed cluster API server. - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. + :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. + :param enable_private_cluster: Whether to create the cluster as a private cluster or not. :type enable_private_cluster: bool :param private_dns_zone: Private dns zone mode for private cluster. :type private_dns_zone: str - :param enable_private_cluster_public_fqdn: Whether to create additional - public FQDN for private cluster or not. + :param enable_private_cluster_public_fqdn: Whether to create additional public FQDN for private + cluster or not. :type enable_private_cluster_public_fqdn: bool """ @@ -1944,7 +2446,15 @@ class ManagedClusterAPIServerAccessProfile(Model): 'enable_private_cluster_public_fqdn': {'key': 'enablePrivateClusterPublicFQDN', 'type': 'bool'}, } - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, private_dns_zone: str=None, enable_private_cluster_public_fqdn: bool=None, **kwargs) -> None: + def __init__( + self, + *, + authorized_ip_ranges: Optional[List[str]] = None, + enable_private_cluster: Optional[bool] = None, + private_dns_zone: Optional[str] = None, + enable_private_cluster_public_fqdn: Optional[bool] = None, + **kwargs + ): super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) self.authorized_ip_ranges = authorized_ip_ranges self.enable_private_cluster = enable_private_cluster @@ -1952,25 +2462,29 @@ def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=No self.enable_private_cluster_public_fqdn = enable_private_cluster_public_fqdn -class ManagedClusterAutoUpgradeProfile(Model): +class ManagedClusterAutoUpgradeProfile(msrest.serialization.Model): """Auto upgrade profile for a managed cluster. - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'node-image', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2021_05_01.models.UpgradeChannel + :param upgrade_channel: upgrade channel for auto upgrade. Possible values include: "rapid", + "stable", "patch", "node-image", "none". + :type upgrade_channel: str or ~azure.mgmt.containerservice.v2021_05_01.models.UpgradeChannel """ _attribute_map = { 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, } - def __init__(self, *, upgrade_channel=None, **kwargs) -> None: + def __init__( + self, + *, + upgrade_channel: Optional[Union[str, "UpgradeChannel"]] = None, + **kwargs + ): super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) self.upgrade_channel = upgrade_channel -class ManagedClusterHTTPProxyConfig(Model): +class ManagedClusterHTTPProxyConfig(msrest.serialization.Model): """Configurations for provisioning the cluster with HTTP proxy servers. :param http_proxy: HTTP proxy server endpoint to use. @@ -1979,8 +2493,7 @@ class ManagedClusterHTTPProxyConfig(Model): :type https_proxy: str :param no_proxy: Endpoints that should not go through proxy. :type no_proxy: list[str] - :param trusted_ca: Alternative CA cert to use for connecting to proxy - servers. + :param trusted_ca: Alternative CA cert to use for connecting to proxy servers. :type trusted_ca: str """ @@ -1991,7 +2504,15 @@ class ManagedClusterHTTPProxyConfig(Model): 'trusted_ca': {'key': 'trustedCa', 'type': 'str'}, } - def __init__(self, *, http_proxy: str=None, https_proxy: str=None, no_proxy=None, trusted_ca: str=None, **kwargs) -> None: + def __init__( + self, + *, + http_proxy: Optional[str] = None, + https_proxy: Optional[str] = None, + no_proxy: Optional[List[str]] = None, + trusted_ca: Optional[str] = None, + **kwargs + ): super(ManagedClusterHTTPProxyConfig, self).__init__(**kwargs) self.http_proxy = http_proxy self.https_proxy = https_proxy @@ -1999,33 +2520,29 @@ def __init__(self, *, http_proxy: str=None, https_proxy: str=None, no_proxy=None self.trusted_ca = trusted_ca -class ManagedClusterIdentity(Model): +class ManagedClusterIdentity(msrest.serialization.Model): """Identity for the managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: + :param type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use + an implicitly created identity in master components and an auto-created user assigned identity + in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, + service principal will be used instead. Possible values include: "SystemAssigned", + "UserAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.ResourceIdentityType + :param user_assigned_identities: The user identity associated with the managed cluster. This + identity will be used in control plane and only one user assigned identity is allowed. The user + identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] + ~azure.mgmt.containerservice.v2021_05_01.models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties] """ _validation = { @@ -2036,11 +2553,17 @@ class ManagedClusterIdentity(Model): _attribute_map = { 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties}'}, } - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + user_assigned_identities: Optional[Dict[str, "Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None, + **kwargs + ): super(ManagedClusterIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None @@ -2048,61 +2571,60 @@ def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> Non self.user_assigned_identities = user_assigned_identities -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str """ _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, + 'next_link': {'readonly': True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None + def __init__( + self, + *, + value: Optional[List["ManagedCluster"]] = None, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None -class ManagedClusterLoadBalancerProfile(Model): +class ManagedClusterLoadBalancerProfile(msrest.serialization.Model): """Profile of the managed cluster load balancer. - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: + :param managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :type managed_outbound_i_ps: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. + :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load + balancer. :type outbound_ip_prefixes: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: + :param outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :type outbound_i_ps: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: + :param effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :type effective_outbound_i_ps: list[~azure.mgmt.containerservice.v2021_05_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . + :param allocated_outbound_ports: Desired number of allocated SNAT ports per VM. Allowed values + must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure + dynamically allocating ports. :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . + :param idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. :type idle_timeout_in_minutes: int """ @@ -2112,30 +2634,39 @@ class ManagedClusterLoadBalancerProfile(Model): } _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, + 'managed_outbound_i_ps': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, + 'outbound_i_ps': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, + 'effective_outbound_i_ps': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, } - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: + def __init__( + self, + *, + managed_outbound_i_ps: Optional["ManagedClusterLoadBalancerProfileManagedOutboundIPs"] = None, + outbound_ip_prefixes: Optional["ManagedClusterLoadBalancerProfileOutboundIPPrefixes"] = None, + outbound_i_ps: Optional["ManagedClusterLoadBalancerProfileOutboundIPs"] = None, + effective_outbound_i_ps: Optional[List["ResourceReference"]] = None, + allocated_outbound_ports: Optional[int] = 0, + idle_timeout_in_minutes: Optional[int] = 30, + **kwargs + ): super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips + self.managed_outbound_i_ps = managed_outbound_i_ps self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips + self.outbound_i_ps = outbound_i_ps + self.effective_outbound_i_ps = effective_outbound_i_ps self.allocated_outbound_ports = allocated_outbound_ports self.idle_timeout_in_minutes = idle_timeout_in_minutes -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileManagedOutboundIPs(msrest.serialization.Model): """Desired managed outbound IPs for the cluster load balancer. - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . + :param count: Desired number of outbound IP created/managed by Azure for the cluster load + balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. :type count: int """ @@ -2147,12 +2678,17 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): 'count': {'key': 'count', 'type': 'int'}, } - def __init__(self, *, count: int=1, **kwargs) -> None: + def __init__( + self, + *, + count: Optional[int] = 1, + **kwargs + ): super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) self.count = count -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): +class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(msrest.serialization.Model): """Desired outbound IP Prefix resources for the cluster load balancer. :param public_ip_prefixes: A list of public IP prefix resources. @@ -2164,33 +2700,41 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, } - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: + def __init__( + self, + *, + public_ip_prefixes: Optional[List["ResourceReference"]] = None, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) self.public_ip_prefixes = public_ip_prefixes -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileOutboundIPs(msrest.serialization.Model): """Desired outbound IP resources for the cluster load balancer. - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2021_05_01.models.ResourceReference] + :param public_i_ps: A list of public IP resources. + :type public_i_ps: list[~azure.mgmt.containerservice.v2021_05_01.models.ResourceReference] """ _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, + 'public_i_ps': {'key': 'publicIPs', 'type': '[ResourceReference]'}, } - def __init__(self, *, public_ips=None, **kwargs) -> None: + def __init__( + self, + *, + public_i_ps: Optional[List["ResourceReference"]] = None, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips + self.public_i_ps = public_i_ps -class ManagedClusterPodIdentity(Model): +class ManagedClusterPodIdentity(msrest.serialization.Model): """ManagedClusterPodIdentity. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2198,15 +2742,12 @@ class ManagedClusterPodIdentity(Model): :type name: str :param namespace: Required. Namespace of the pod identity. :type namespace: str - :param binding_selector: Binding selector to use for the - AzureIdentityBinding resource. + :param binding_selector: Binding selector to use for the AzureIdentityBinding resource. :type binding_selector: str :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2021_05_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' + :type identity: ~azure.mgmt.containerservice.v2021_05_01.models.UserAssignedIdentity + :ivar provisioning_state: The current provisioning state of the pod identity. Possible values + include: "Assigned", "Updating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityProvisioningState :ivar provisioning_info: @@ -2231,7 +2772,15 @@ class ManagedClusterPodIdentity(Model): 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, } - def __init__(self, *, name: str, namespace: str, identity, binding_selector: str=None, **kwargs) -> None: + def __init__( + self, + *, + name: str, + namespace: str, + identity: "UserAssignedIdentity", + binding_selector: Optional[str] = None, + **kwargs + ): super(ManagedClusterPodIdentity, self).__init__(**kwargs) self.name = name self.namespace = namespace @@ -2241,7 +2790,7 @@ def __init__(self, *, name: str, namespace: str, identity, binding_selector: str self.provisioning_info = None -class ManagedClusterPodIdentityException(Model): +class ManagedClusterPodIdentityException(msrest.serialization.Model): """ManagedClusterPodIdentityException. All required parameters must be populated in order to send to Azure. @@ -2266,26 +2815,32 @@ class ManagedClusterPodIdentityException(Model): 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, } - def __init__(self, *, name: str, namespace: str, pod_labels, **kwargs) -> None: + def __init__( + self, + *, + name: str, + namespace: str, + pod_labels: Dict[str, str], + **kwargs + ): super(ManagedClusterPodIdentityException, self).__init__(**kwargs) self.name = name self.namespace = namespace self.pod_labels = pod_labels -class ManagedClusterPodIdentityProfile(Model): +class ManagedClusterPodIdentityProfile(msrest.serialization.Model): """ManagedClusterPodIdentityProfile. :param enabled: Whether the pod identity addon is enabled. :type enabled: bool - :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod - identity addon in cluster using Kubenet network plugin. + :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod identity addon in + cluster using Kubenet network plugin. :type allow_network_plugin_kubenet: bool :param user_assigned_identities: User assigned pod identity settings. :type user_assigned_identities: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. + :param user_assigned_identity_exceptions: User assigned pod identity exception settings. :type user_assigned_identity_exceptions: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityException] """ @@ -2297,7 +2852,15 @@ class ManagedClusterPodIdentityProfile(Model): 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, } - def __init__(self, *, enabled: bool=None, allow_network_plugin_kubenet: bool=None, user_assigned_identities=None, user_assigned_identity_exceptions=None, **kwargs) -> None: + def __init__( + self, + *, + enabled: Optional[bool] = None, + allow_network_plugin_kubenet: Optional[bool] = None, + user_assigned_identities: Optional[List["ManagedClusterPodIdentity"]] = None, + user_assigned_identity_exceptions: Optional[List["ManagedClusterPodIdentityException"]] = None, + **kwargs + ): super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) self.enabled = enabled self.allow_network_plugin_kubenet = allow_network_plugin_kubenet @@ -2305,7 +2868,7 @@ def __init__(self, *, enabled: bool=None, allow_network_plugin_kubenet: bool=Non self.user_assigned_identity_exceptions = user_assigned_identity_exceptions -class ManagedClusterPodIdentityProvisioningInfo(Model): +class ManagedClusterPodIdentityProvisioningInfo(msrest.serialization.Model): """ManagedClusterPodIdentityProvisioningInfo. :param error: Pod identity assignment error (if any). @@ -2316,28 +2879,29 @@ class ManagedClusterPodIdentityProvisioningInfo(Model): 'error': {'key': 'error', 'type': 'CloudError'}, } - def __init__(self, *, error=None, **kwargs) -> None: + def __init__( + self, + *, + error: Optional["CloudError"] = None, + **kwargs + ): super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) self.error = error -class ManagedClusterPoolUpgradeProfile(Model): +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrade versions. All required parameters must be populated in order to send to Azure. - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str :param name: Pool name. :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] """ @@ -2354,7 +2918,15 @@ class ManagedClusterPoolUpgradeProfile(Model): 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, } - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "OSType"] = "Linux", + name: Optional[str] = None, + upgrades: Optional[List["ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, + **kwargs + ): super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) self.kubernetes_version = kubernetes_version self.name = name @@ -2362,7 +2934,7 @@ def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", self.upgrades = upgrades -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): """ManagedClusterPoolUpgradeProfileUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -2376,21 +2948,25 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kubernetes_version self.is_preview = is_preview -class ManagedClusterPropertiesAutoScalerProfile(Model): +class ManagedClusterPropertiesAutoScalerProfile(msrest.serialization.Model): """Parameters to be applied to the cluster-autoscaler when enabled. :param balance_similar_node_groups: :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2021_05_01.models.Expander + :param expander: Possible values include: "least-waste", "most-pods", "priority", "random". + :type expander: str or ~azure.mgmt.containerservice.v2021_05_01.models.Expander :param max_empty_bulk_delete: :type max_empty_bulk_delete: str :param max_graceful_termination_sec: @@ -2443,7 +3019,28 @@ class ManagedClusterPropertiesAutoScalerProfile(Model): 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, } - def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_empty_bulk_delete: str=None, max_graceful_termination_sec: str=None, max_node_provision_time: str=None, max_total_unready_percentage: str=None, new_pod_scale_up_delay: str=None, ok_total_unready_count: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, skip_nodes_with_local_storage: str=None, skip_nodes_with_system_pods: str=None, **kwargs) -> None: + def __init__( + self, + *, + balance_similar_node_groups: Optional[str] = None, + expander: Optional[Union[str, "Expander"]] = None, + max_empty_bulk_delete: Optional[str] = None, + max_graceful_termination_sec: Optional[str] = None, + max_node_provision_time: Optional[str] = None, + max_total_unready_percentage: Optional[str] = None, + new_pod_scale_up_delay: Optional[str] = None, + ok_total_unready_count: Optional[str] = None, + scan_interval: Optional[str] = None, + scale_down_delay_after_add: Optional[str] = None, + scale_down_delay_after_delete: Optional[str] = None, + scale_down_delay_after_failure: Optional[str] = None, + scale_down_unneeded_time: Optional[str] = None, + scale_down_unready_time: Optional[str] = None, + scale_down_utilization_threshold: Optional[str] = None, + skip_nodes_with_local_storage: Optional[str] = None, + skip_nodes_with_system_pods: Optional[str] = None, + **kwargs + ): super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) self.balance_similar_node_groups = balance_similar_node_groups self.expander = expander @@ -2464,37 +3061,14 @@ def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_ self.skip_nodes_with_system_pods = skip_nodes_with_system_pods -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. All required parameters must be populated in order to send to Azure. :param client_id: Required. The ID for the service principal. :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. + :param secret: The secret password associated with the service principal in plain text. :type secret: str """ @@ -2507,23 +3081,25 @@ class ManagedClusterServicePrincipalProfile(Model): 'secret': {'key': 'secret', 'type': 'str'}, } - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: + def __init__( + self, + *, + client_id: str, + secret: Optional[str] = None, + **kwargs + ): super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) self.client_id = client_id self.secret = secret -class ManagedClusterSKU(Model): +class ManagedClusterSKU(msrest.serialization.Model): """ManagedClusterSKU. - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUTier + :param name: Name of a managed cluster SKU. Possible values include: "Basic". + :type name: str or ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUName + :param tier: Tier of a managed cluster SKU. Possible values include: "Paid", "Free". + :type tier: str or ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUTier """ _attribute_map = { @@ -2531,17 +3107,22 @@ class ManagedClusterSKU(Model): 'tier': {'key': 'tier', 'type': 'str'}, } - def __init__(self, *, name=None, tier=None, **kwargs) -> None: + def __init__( + self, + *, + name: Optional[Union[str, "ManagedClusterSKUName"]] = None, + tier: Optional[Union[str, "ManagedClusterSKUTier"]] = None, + **kwargs + ): super(ManagedClusterSKU, self).__init__(**kwargs) self.name = name self.tier = tier -class ManagedClusterUpgradeProfile(Model): +class ManagedClusterUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for compute pools. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2551,12 +3132,11 @@ class ManagedClusterUpgradeProfile(Model): :vartype name: str :ivar type: Type of upgrade profile. :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. :type control_plane_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPoolUpgradeProfile] """ @@ -2577,7 +3157,13 @@ class ManagedClusterUpgradeProfile(Model): 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, } - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: + def __init__( + self, + *, + control_plane_profile: "ManagedClusterPoolUpgradeProfile", + agent_pool_profiles: List["ManagedClusterPoolUpgradeProfile"], + **kwargs + ): super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None @@ -2586,34 +3172,30 @@ def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> N self.agent_pool_profiles = agent_pool_profiles -class ManagedClusterWindowsProfile(Model): +class ManagedClusterWindowsProfile(msrest.serialization.Model): """Profile for Windows VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.LicenseType + :param license_type: The licenseType to use for Windows VMs. Windows_Server is used to enable + Azure Hybrid User Benefits for Windows VMs. Possible values include: "None", "Windows_Server". + :type license_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.LicenseType :param enable_csi_proxy: Whether to enable CSI proxy. :type enable_csi_proxy: bool """ @@ -2629,7 +3211,15 @@ class ManagedClusterWindowsProfile(Model): 'enable_csi_proxy': {'key': 'enableCSIProxy', 'type': 'bool'}, } - def __init__(self, *, admin_username: str, admin_password: str=None, license_type=None, enable_csi_proxy: bool=None, **kwargs) -> None: + def __init__( + self, + *, + admin_username: str, + admin_password: Optional[str] = None, + license_type: Optional[Union[str, "LicenseType"]] = None, + enable_csi_proxy: Optional[bool] = None, + **kwargs + ): super(ManagedClusterWindowsProfile, self).__init__(**kwargs) self.admin_username = admin_username self.admin_password = admin_password @@ -2637,11 +3227,35 @@ def __init__(self, *, admin_username: str, admin_password: str=None, license_typ self.enable_csi_proxy = enable_csi_proxy -class OperationValue(Model): +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.containerservice.v2021_05_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): """Describes the properties of a Compute Operation value. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar origin: The origin of the compute operation. :vartype origin: str @@ -2675,7 +3289,10 @@ class OperationValue(Model): 'provider': {'key': 'display.provider', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(OperationValue, self).__init__(**kwargs) self.origin = None self.name = None @@ -2685,11 +3302,10 @@ def __init__(self, **kwargs) -> None: self.provider = None -class OSOptionProfile(Model): +class OSOptionProfile(msrest.serialization.Model): """The OS option profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2699,8 +3315,7 @@ class OSOptionProfile(Model): :vartype name: str :ivar type: Type of the OS option profile. :vartype type: str - :param os_option_property_list: Required. The list of OS option - properties. + :param os_option_property_list: Required. The list of OS option properties. :type os_option_property_list: list[~azure.mgmt.containerservice.v2021_05_01.models.OSOptionProperty] """ @@ -2719,7 +3334,12 @@ class OSOptionProfile(Model): 'os_option_property_list': {'key': 'properties.osOptionPropertyList', 'type': '[OSOptionProperty]'}, } - def __init__(self, *, os_option_property_list, **kwargs) -> None: + def __init__( + self, + *, + os_option_property_list: List["OSOptionProperty"], + **kwargs + ): super(OSOptionProfile, self).__init__(**kwargs) self.id = None self.name = None @@ -2727,7 +3347,7 @@ def __init__(self, *, os_option_property_list, **kwargs) -> None: self.os_option_property_list = os_option_property_list -class OSOptionProperty(Model): +class OSOptionProperty(msrest.serialization.Model): """OS option property. All required parameters must be populated in order to send to Azure. @@ -2748,21 +3368,26 @@ class OSOptionProperty(Model): 'enable_fips_image': {'key': 'enable-fips-image', 'type': 'bool'}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs) -> None: + def __init__( + self, + *, + os_type: str, + enable_fips_image: bool, + **kwargs + ): super(OSOptionProperty, self).__init__(**kwargs) self.os_type = os_type self.enable_fips_image = enable_fips_image -class OutboundEnvironmentEndpoint(Model): +class OutboundEnvironmentEndpoint(msrest.serialization.Model): """Egress endpoints which AKS agent nodes connect to for common purpose. - :param category: The category of endpoints accessed by the AKS agent node, - e.g. azure-resource-management, apiserver, etc. + :param category: The category of endpoints accessed by the AKS agent node, e.g. + azure-resource-management, apiserver, etc. :type category: str - :param endpoints: The endpoints that AKS agent nodes connect to - :type endpoints: - list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDependency] + :param endpoints: The endpoints that AKS agent nodes connect to. + :type endpoints: list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDependency] """ _attribute_map = { @@ -2770,17 +3395,57 @@ class OutboundEnvironmentEndpoint(Model): 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, } - def __init__(self, *, category: str=None, endpoints=None, **kwargs) -> None: + def __init__( + self, + *, + category: Optional[str] = None, + endpoints: Optional[List["EndpointDependency"]] = None, + **kwargs + ): super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) self.category = category self.endpoints = endpoints -class PowerState(Model): +class OutboundEnvironmentEndpointCollection(msrest.serialization.Model): + """Collection of OutboundEnvironmentEndpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.OutboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["OutboundEnvironmentEndpoint"], + **kwargs + ): + super(OutboundEnvironmentEndpointCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PowerState(msrest.serialization.Model): """Describes the Power State of the cluster. - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' + :param code: Tells whether the cluster is Running or Stopped. Possible values include: + "Running", "Stopped". :type code: str or ~azure.mgmt.containerservice.v2021_05_01.models.Code """ @@ -2788,15 +3453,20 @@ class PowerState(Model): 'code': {'key': 'code', 'type': 'str'}, } - def __init__(self, *, code=None, **kwargs) -> None: + def __init__( + self, + *, + code: Optional[Union[str, "Code"]] = None, + **kwargs + ): super(PowerState, self).__init__(**kwargs) self.code = code -class PrivateEndpoint(Model): +class PrivateEndpoint(msrest.serialization.Model): """Private endpoint which a connection belongs to. - :param id: The resource Id for private endpoint + :param id: The resource Id for private endpoint. :type id: str """ @@ -2804,18 +3474,20 @@ class PrivateEndpoint(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): super(PrivateEndpoint, self).__init__(**kwargs) self.id = id -class PrivateEndpointConnection(Model): +class PrivateEndpointConnection(msrest.serialization.Model): """A private endpoint connection. - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The ID of the private endpoint connection. :vartype id: str @@ -2823,16 +3495,14 @@ class PrivateEndpointConnection(Model): :vartype name: str :ivar type: The resource type. :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + :ivar provisioning_state: The current provisioning state. Possible values include: "Succeeded", + "Creating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnectionProvisioningState :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. + :type private_endpoint: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. :type private_link_service_connection_state: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkServiceConnectionState """ @@ -2842,7 +3512,6 @@ class PrivateEndpointConnection(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, } _attribute_map = { @@ -2854,7 +3523,13 @@ class PrivateEndpointConnection(Model): 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, } - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: + def __init__( + self, + *, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): super(PrivateEndpointConnection, self).__init__(**kwargs) self.id = None self.name = None @@ -2864,28 +3539,31 @@ def __init__(self, *, private_link_service_connection_state, private_endpoint=No self.private_link_service_connection_state = private_link_service_connection_state -class PrivateEndpointConnectionListResult(Model): +class PrivateEndpointConnectionListResult(msrest.serialization.Model): """A list of private endpoint connections. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection] + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, } - def __init__(self, *, value=None, **kwargs) -> None: + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + **kwargs + ): super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) self.value = value -class PrivateLinkResource(Model): +class PrivateLinkResource(msrest.serialization.Model): """A private link resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: The ID of the private link resource. :type id: str @@ -2895,10 +3573,10 @@ class PrivateLinkResource(Model): :type type: str :param group_id: The group ID of the resource. :type group_id: str - :param required_members: RequiredMembers of the resource + :param required_members: RequiredMembers of the resource. :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. + :ivar private_link_service_id: The private link service ID of the resource, this field is + exposed only to NRP internally. :vartype private_link_service_id: str """ @@ -2915,7 +3593,16 @@ class PrivateLinkResource(Model): 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, } - def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: str=None, required_members=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + group_id: Optional[str] = None, + required_members: Optional[List[str]] = None, + **kwargs + ): super(PrivateLinkResource, self).__init__(**kwargs) self.id = id self.name = name @@ -2925,30 +3612,33 @@ def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: st self.private_link_service_id = None -class PrivateLinkResourcesListResult(Model): +class PrivateLinkResourcesListResult(msrest.serialization.Model): """A list of private link resources. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, } - def __init__(self, *, value=None, **kwargs) -> None: + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + **kwargs + ): super(PrivateLinkResourcesListResult, self).__init__(**kwargs) self.value = value -class PrivateLinkServiceConnectionState(Model): +class PrivateLinkServiceConnectionState(msrest.serialization.Model): """The state of a private link service connection. - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ConnectionStatus + :param status: The private link service connection status. Possible values include: "Pending", + "Approved", "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.containerservice.v2021_05_01.models.ConnectionStatus :param description: The private link service connection description. :type description: str """ @@ -2958,13 +3648,19 @@ class PrivateLinkServiceConnectionState(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: + def __init__( + self, + *, + status: Optional[Union[str, "ConnectionStatus"]] = None, + description: Optional[str] = None, + **kwargs + ): super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) self.status = status self.description = description -class ResourceReference(Model): +class ResourceReference(msrest.serialization.Model): """A reference to an Azure resource. :param id: The fully qualified Azure resource id. @@ -2975,20 +3671,24 @@ class ResourceReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): super(ResourceReference, self).__init__(**kwargs) self.id = id -class RunCommandRequest(Model): +class RunCommandRequest(msrest.serialization.Model): """run command request. All required parameters must be populated in order to send to Azure. :param command: Required. command to run. :type command: str - :param context: base64 encoded zip file, contains files required by the - command + :param context: base64 encoded zip file, contains files required by the command. :type context: str :param cluster_token: AuthToken issued for AKS AAD Server App. :type cluster_token: str @@ -3004,29 +3704,35 @@ class RunCommandRequest(Model): 'cluster_token': {'key': 'clusterToken', 'type': 'str'}, } - def __init__(self, *, command: str, context: str=None, cluster_token: str=None, **kwargs) -> None: + def __init__( + self, + *, + command: str, + context: Optional[str] = None, + cluster_token: Optional[str] = None, + **kwargs + ): super(RunCommandRequest, self).__init__(**kwargs) self.command = command self.context = context self.cluster_token = cluster_token -class RunCommandResult(Model): +class RunCommandResult(msrest.serialization.Model): """run command result. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: command id. :vartype id: str - :ivar provisioning_state: provisioning State + :ivar provisioning_state: provisioning State. :vartype provisioning_state: str - :ivar exit_code: exit code of the command + :ivar exit_code: exit code of the command. :vartype exit_code: int :ivar started_at: time when the command started. - :vartype started_at: datetime + :vartype started_at: ~datetime.datetime :ivar finished_at: time when the command finished. - :vartype finished_at: datetime + :vartype finished_at: ~datetime.datetime :ivar logs: command output. :vartype logs: str :ivar reason: explain why provisioningState is set to failed (if so). @@ -3053,7 +3759,10 @@ class RunCommandResult(Model): 'reason': {'key': 'properties.reason', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(RunCommandResult, self).__init__(**kwargs) self.id = None self.provisioning_state = None @@ -3064,13 +3773,12 @@ def __init__(self, **kwargs) -> None: self.reason = None -class SysctlConfig(Model): +class SysctlConfig(msrest.serialization.Model): """Sysctl settings for Linux agent nodes. :param net_core_somaxconn: Sysctl setting net.core.somaxconn. :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. + :param net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. :type net_core_netdev_max_backlog: int :param net_core_rmem_default: Sysctl setting net.core.rmem_default. :type net_core_rmem_default: int @@ -3082,45 +3790,33 @@ class SysctlConfig(Model): :type net_core_wmem_max: int :param net_core_optmem_max: Sysctl setting net.core.optmem_max. :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. + :param net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. + :param net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. :type net_ipv4_tcp_max_tw_buckets: int :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. + :param net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. + :param net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. + :param net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. :type net_ipv4_tcpkeepalive_intvl: int :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. + :param net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. + :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. + :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. + :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. + :param net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. + :param net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. + :param fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. :type fs_inotify_max_user_watches: int :param fs_file_max: Sysctl setting fs.file-max. :type fs_file_max: int @@ -3169,7 +3865,39 @@ class SysctlConfig(Model): 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, } - def __init__(self, *, net_core_somaxconn: int=None, net_core_netdev_max_backlog: int=None, net_core_rmem_default: int=None, net_core_rmem_max: int=None, net_core_wmem_default: int=None, net_core_wmem_max: int=None, net_core_optmem_max: int=None, net_ipv4_tcp_max_syn_backlog: int=None, net_ipv4_tcp_max_tw_buckets: int=None, net_ipv4_tcp_fin_timeout: int=None, net_ipv4_tcp_keepalive_time: int=None, net_ipv4_tcp_keepalive_probes: int=None, net_ipv4_tcpkeepalive_intvl: int=None, net_ipv4_tcp_tw_reuse: bool=None, net_ipv4_ip_local_port_range: str=None, net_ipv4_neigh_default_gc_thresh1: int=None, net_ipv4_neigh_default_gc_thresh2: int=None, net_ipv4_neigh_default_gc_thresh3: int=None, net_netfilter_nf_conntrack_max: int=None, net_netfilter_nf_conntrack_buckets: int=None, fs_inotify_max_user_watches: int=None, fs_file_max: int=None, fs_aio_max_nr: int=None, fs_nr_open: int=None, kernel_threads_max: int=None, vm_max_map_count: int=None, vm_swappiness: int=None, vm_vfs_cache_pressure: int=None, **kwargs) -> None: + def __init__( + self, + *, + net_core_somaxconn: Optional[int] = None, + net_core_netdev_max_backlog: Optional[int] = None, + net_core_rmem_default: Optional[int] = None, + net_core_rmem_max: Optional[int] = None, + net_core_wmem_default: Optional[int] = None, + net_core_wmem_max: Optional[int] = None, + net_core_optmem_max: Optional[int] = None, + net_ipv4_tcp_max_syn_backlog: Optional[int] = None, + net_ipv4_tcp_max_tw_buckets: Optional[int] = None, + net_ipv4_tcp_fin_timeout: Optional[int] = None, + net_ipv4_tcp_keepalive_time: Optional[int] = None, + net_ipv4_tcp_keepalive_probes: Optional[int] = None, + net_ipv4_tcpkeepalive_intvl: Optional[int] = None, + net_ipv4_tcp_tw_reuse: Optional[bool] = None, + net_ipv4_ip_local_port_range: Optional[str] = None, + net_ipv4_neigh_default_gc_thresh1: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh2: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh3: Optional[int] = None, + net_netfilter_nf_conntrack_max: Optional[int] = None, + net_netfilter_nf_conntrack_buckets: Optional[int] = None, + fs_inotify_max_user_watches: Optional[int] = None, + fs_file_max: Optional[int] = None, + fs_aio_max_nr: Optional[int] = None, + fs_nr_open: Optional[int] = None, + kernel_threads_max: Optional[int] = None, + vm_max_map_count: Optional[int] = None, + vm_swappiness: Optional[int] = None, + vm_vfs_cache_pressure: Optional[int] = None, + **kwargs + ): super(SysctlConfig, self).__init__(**kwargs) self.net_core_somaxconn = net_core_somaxconn self.net_core_netdev_max_backlog = net_core_netdev_max_backlog @@ -3201,27 +3929,24 @@ def __init__(self, *, net_core_somaxconn: int=None, net_core_netdev_max_backlog: self.vm_vfs_cache_pressure = vm_vfs_cache_pressure -class SystemData(Model): +class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. :param created_by: The identity that created the resource. :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.CreatedByType + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.CreatedByType :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime + :type created_at: ~datetime.datetime :param last_modified_by: The identity that last modified the resource. :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". :type last_modified_by_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: datetime + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime """ _attribute_map = { @@ -3233,7 +3958,17 @@ class SystemData(Model): 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, } - def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): super(SystemData, self).__init__(**kwargs) self.created_by = created_by self.created_by_type = created_by_type @@ -3243,10 +3978,10 @@ def __init__(self, *, created_by: str=None, created_by_type=None, created_at=Non self.last_modified_at = last_modified_at -class TagsObject(Model): +class TagsObject(msrest.serialization.Model): """Tags object for patch operations. - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -3254,16 +3989,21 @@ class TagsObject(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, tags=None, **kwargs) -> None: + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): super(TagsObject, self).__init__(**kwargs) self.tags = tags -class TimeInWeek(Model): +class TimeInWeek(msrest.serialization.Model): """Time in a week. - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + :param day: A day in a week. Possible values include: "Sunday", "Monday", "Tuesday", + "Wednesday", "Thursday", "Friday", "Saturday". :type day: str or ~azure.mgmt.containerservice.v2021_05_01.models.WeekDay :param hour_slots: hour slots in a day. :type hour_slots: list[int] @@ -3274,19 +4014,25 @@ class TimeInWeek(Model): 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, } - def __init__(self, *, day=None, hour_slots=None, **kwargs) -> None: + def __init__( + self, + *, + day: Optional[Union[str, "WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs + ): super(TimeInWeek, self).__init__(**kwargs) self.day = day self.hour_slots = hour_slots -class TimeSpan(Model): +class TimeSpan(msrest.serialization.Model): """The time span with start and end properties. - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime + :param start: The start of a time span. + :type start: ~datetime.datetime + :param end: The end of a time span. + :type end: ~datetime.datetime """ _attribute_map = { @@ -3294,7 +4040,13 @@ class TimeSpan(Model): 'end': {'key': 'end', 'type': 'iso-8601'}, } - def __init__(self, *, start=None, end=None, **kwargs) -> None: + def __init__( + self, + *, + start: Optional[datetime.datetime] = None, + end: Optional[datetime.datetime] = None, + **kwargs + ): super(TimeSpan, self).__init__(**kwargs) self.start = start self.end = end diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_paged_models.py deleted file mode 100644 index 8908e2e503c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_paged_models.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class OutboundEnvironmentEndpointPaged(Paged): - """ - A paging container for iterating over a list of :class:`OutboundEnvironmentEndpoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'} - } - - def __init__(self, *args, **kwargs): - - super(OutboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) -class MaintenanceConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`MaintenanceConfiguration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MaintenanceConfiguration]'} - } - - def __init__(self, *args, **kwargs): - - super(MaintenanceConfigurationPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/__init__.py old mode 100644 new mode 100755 index d7bfa3f00fe..3942e0ca6a0 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/__init__.py @@ -1,12 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._operations import Operations diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_agent_pools_operations.py old mode 100644 new mode 100755 index 9e9dbfdb01d..76b28d7fd51 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_agent_pools_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_agent_pools_operations.py @@ -1,127 +1,141 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class AgentPoolsOperations(object): """AgentPoolsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" - - self.config = config + self._config = config def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AgentPoolListResult"] """Gets a list of agent pools in the specified managed cluster. - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. + Gets a list of agent pools in the specified managed cluster. The operation returns properties + of each agent pool. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPool" """Gets the agent pool. - Gets the details of the agent pool by managed cluster and resource - group. + Gets the details of the agent pool by managed cluster and resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -129,115 +143,122 @@ def get( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPool + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPool" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.create_or_update.metadata['url'] + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AgentPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) + if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AgentPool"] """Creates or updates an agent pool. Creates or updates an agent pool in the specified managed cluster. @@ -248,92 +269,121 @@ def create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Create or Update an agent pool operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes an agent pool. Deletes the agent pool in the specified managed cluster. @@ -344,46 +394,72 @@ def delete( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPoolUpgradeProfile" """Gets upgrade profile for an agent pool. - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. + Gets the details of the upgrade profile for an agent pool with a specified resource group and + managed cluster name. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -391,63 +467,60 @@ def get_upgrade_profile( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get_upgrade_profile.metadata['url'] + url = self.get_upgrade_profile.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) + deserialized = self._deserialize('AgentPoolUpgradeProfile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} # type: ignore def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPoolAvailableVersions" """Gets a list of supported versions for the specified agent pool. Gets a list of supported versions for the specified agent pool. @@ -456,109 +529,112 @@ def get_available_agent_pool_versions( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolAvailableVersions, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolAvailableVersions + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolAvailableVersions"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] + url = self.get_available_agent_pool_versions.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) + deserialized = self._deserialize('AgentPoolAvailableVersions', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} - + get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} # type: ignore def _upgrade_node_image_version_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.AgentPool"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AgentPool"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.upgrade_node_image_version.metadata['url'] + url = self._upgrade_node_image_version_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None - if response.status_code == 202: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def upgrade_node_image_version( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + _upgrade_node_image_version_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore + + def begin_upgrade_node_image_version( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AgentPool"] """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. @@ -569,42 +645,59 @@ def upgrade_node_image_version( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._upgrade_node_image_version_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_maintenance_configurations_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_maintenance_configurations_operations.py old mode 100644 new mode 100755 index 9a2f30f5508..0fdcd1ee2fa --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_maintenance_configurations_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_maintenance_configurations_operations.py @@ -1,129 +1,139 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class MaintenanceConfigurationsOperations(object): """MaintenanceConfigurationsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" - - self.config = config + self._config = config def list_by_managed_cluster( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of maintenance configurations in the specified managed - cluster. + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.MaintenanceConfigurationListResult"] + """Gets a list of maintenance configurations in the specified managed cluster. - Gets a list of maintenance configurations in the specified managed - cluster. The operation returns properties of each maintenance - configuration. + Gets a list of maintenance configurations in the specified managed cluster. The operation + returns properties of each maintenance configuration. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of MaintenanceConfiguration - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfigurationPaged[~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MaintenanceConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_managed_cluster.metadata['url'] + url = self.list_by_managed_cluster.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('MaintenanceConfigurationListResult', 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) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.MaintenanceConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} + return ItemPaged( + get_next, extract_data + ) + list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} # type: ignore def get( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MaintenanceConfiguration" """Gets the maintenance configuration. - Gets the details of maintenance configurations by managed cluster and - resource group. + Gets the details of maintenance configurations by managed cluster and resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -131,120 +141,138 @@ def get( :type resource_name: str :param config_name: The name of the maintenance configuration. :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MaintenanceConfiguration or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') + 'configName': self._serialize.url("config_name", config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + def create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + parameters, # type: "_models.MaintenanceConfiguration" + **kwargs # type: Any + ): + # type: (...) -> "_models.MaintenanceConfiguration" + """Creates or updates a maintenance configurations. - def _create_or_update_initial( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, **operation_config): - parameters = models.MaintenanceConfiguration(time_in_week=time_in_week, not_allowed_time=not_allowed_time) + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :param parameters: Parameters supplied to the Create or Update a default maintenance + configuration. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') + 'configName': self._serialize.url("config_name", config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore - def create_or_update( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a maintenance configurations. + def delete( + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a maintenance configuration. - Creates or updates a maintenance configuration in the specified managed - cluster. + Deletes the maintenance configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -252,136 +280,46 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. :type config_name: str - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_05_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_05_01.models.TimeSpan] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - MaintenanceConfiguration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - time_in_week=time_in_week, - not_allowed_time=not_allowed_time, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} - + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" - def _delete_initial( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') + 'configName': self._serialize.url("config_name", config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a maintenance configuration. - - Deletes the maintenance configuration in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_managed_clusters_operations.py old mode 100644 new mode 100755 index 8fe243e5cf5..db49ec983fd --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_managed_clusters_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_managed_clusters_operations.py @@ -1,825 +1,845 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class ManagedClustersOperations(object): """ManagedClustersOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" - - self.config = config + self._config = config def get_os_options( - self, location, resource_type=None, custom_headers=None, raw=False, **operation_config): + self, + location, # type: str + resource_type=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.OSOptionProfile" """Gets supported OS options in the specified subscription. Gets supported OS options in the specified subscription. :param location: The name of a supported Azure region. :type location: str - :param resource_type: resource type for which the OS options needs to - be returned + :param resource_type: resource type for which the OS options needs to be returned. :type resource_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OSOptionProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.OSOptionProfile or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OSOptionProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.OSOptionProfile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OSOptionProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get_os_options.metadata['url'] + url = self.get_os_options.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if resource_type is not None: query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('OSOptionProfile', response) + deserialized = self._deserialize('OSOptionProfile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_os_options.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default'} + get_os_options.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default'} # type: ignore def list( - self, custom_headers=None, raw=False, **operation_config): + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] """Gets a list of managed clusters in the specified subscription. - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] - :raises: :class:`CloudError` + Gets a list of managed clusters in the specified subscription. The operation returns properties + of each managed cluster. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] + """Lists managed clusters in the specified subscription and resource group. - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. + Lists managed clusters in the specified subscription and resource group. The operation returns + properties of each managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - return response + return pipeline_response - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterUpgradeProfile" """Gets upgrade profile for a managed cluster. - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. + Gets the details of the upgrade profile for a managed cluster with a specified resource group + and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get_upgrade_profile.metadata['url'] + url = self.get_upgrade_profile.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + role_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterAccessProfile" """Gets an access profile of a managed cluster. - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . + Gets the accessProfile for the specified role name of the managed cluster with a specified + resource group and name. **WARNING**\ : This API will be deprecated. Instead use + `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. + :param role_name: The name of the role for managed cluster accessProfile resource. :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get_access_profile.metadata['url'] + url = self.get_access_profile.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') + 'roleName': self._serialize.url("role_name", role_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore def list_cluster_admin_credentials( - self, resource_group_name, resource_name, server_fqdn=None, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + server_fqdn=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" """Gets cluster admin credential of a managed cluster. - Gets cluster admin credential of the managed cluster with a specified - resource group and name. + Gets cluster admin credential of the managed cluster with a specified resource group and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param server_fqdn: server fqdn type for credentials to be returned + :param server_fqdn: server fqdn type for credentials to be returned. :type server_fqdn: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if server_fqdn is not None: query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + deserialized = self._deserialize('CredentialResults', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore def list_cluster_user_credentials( - self, resource_group_name, resource_name, server_fqdn=None, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + server_fqdn=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" """Gets cluster user credential of a managed cluster. - Gets cluster user credential of the managed cluster with a specified - resource group and name. + Gets cluster user credential of the managed cluster with a specified resource group and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param server_fqdn: server fqdn type for credentials to be returned + :param server_fqdn: server fqdn type for credentials to be returned. :type server_fqdn: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if server_fqdn is not None: query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + deserialized = self._deserialize('CredentialResults', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, server_fqdn=None, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + server_fqdn=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" """Gets cluster monitoring user credential of a managed cluster. - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. + Gets cluster monitoring user credential of the managed cluster with a specified resource group + and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param server_fqdn: server fqdn type for credentials to be returned + :param server_fqdn: server fqdn type for credentials to be returned. :type server_fqdn: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] + url = self.list_cluster_monitoring_user_credentials.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if server_fqdn is not None: query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + deserialized = self._deserialize('CredentialResults', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} + list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} # type: ignore def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" """Gets a managed cluster. - Gets the details of the managed cluster with a specified resource group - and name. + Gets the details of the managed cluster with a specified resource group and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster, or the result of cls(response) :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.create_or_update.metadata['url'] + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) + if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedCluster"] """Creates or updates a managed cluster. - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. + Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + version. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.update_tags.metadata['url'] + url = self._update_tags_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_update_tags( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedCluster"] """Updates tags on a managed cluster. Updates a managed cluster with the specified tags. @@ -828,88 +848,116 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes a managed cluster. Deletes the managed cluster with a specified resource group and name. @@ -918,85 +966,117 @@ def delete( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.reset_service_principal_profile.metadata['url'] + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + def begin_reset_service_principal_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Reset Service Principal Profile of a managed cluster. Update the service principal Profile for a managed cluster. @@ -1005,90 +1085,121 @@ def reset_service_principal_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a + Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterServicePrincipalProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_service_principal_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.reset_aad_profile.metadata['url'] + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + def begin_reset_aad_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Reset AAD Profile of a managed cluster. Update the AAD Profile for a managed cluster. @@ -1097,84 +1208,114 @@ def reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed + Cluster. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] + url = self._rotate_cluster_certificates_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + if cls: + return cls(pipeline_response, None, {}) - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + _rotate_cluster_certificates_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + def begin_rotate_cluster_certificates( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Rotate certificates of a managed cluster. Rotate certificates of a managed cluster. @@ -1183,79 +1324,110 @@ def rotate_cluster_certificates( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._rotate_cluster_certificates_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore def _stop_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.stop.metadata['url'] + url = self._stop_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + if cls: + return cls(pipeline_response, None, {}) - def stop( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore + + def begin_stop( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Stop Managed Cluster. Stops a Running Managed Cluster. @@ -1264,79 +1436,110 @@ def stop( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore def _start_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.start.metadata['url'] + url = self._start_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore - def start( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + def begin_start( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Start Managed Cluster. Starts a Stopped Managed Cluster. @@ -1345,146 +1548,197 @@ def start( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore def _run_command_initial( - self, resource_group_name, resource_name, request_payload, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + request_payload, # type: "_models.RunCommandRequest" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.RunCommandResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.RunCommandResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.run_command.metadata['url'] + url = self._run_command_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request_payload, 'RunCommandRequest') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request_payload, 'RunCommandRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) + deserialized = self._deserialize('RunCommandResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def run_command( - self, resource_group_name, resource_name, request_payload, custom_headers=None, raw=False, polling=True, **operation_config): + _run_command_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} # type: ignore + + def begin_run_command( + self, + resource_group_name, # type: str + resource_name, # type: str + request_payload, # type: "_models.RunCommandRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.RunCommandResult"] """Run Command against Managed Kubernetes Service. - Submit a command to run against managed kubernetes service, it will - create a pod to run the command. + Submit a command to run against managed kubernetes service, it will create a pod to run the + command. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param request_payload: Parameters supplied to the RunCommand - operation. - :type request_payload: - ~azure.mgmt.containerservice.v2021_05_01.models.RunCommandRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_05_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_05_01.models.RunCommandResult]] - :raises: :class:`CloudError` + :param request_payload: Parameters supplied to the RunCommand operation. + :type request_payload: ~azure.mgmt.containerservice.v2021_05_01.models.RunCommandRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either RunCommandResult or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2021_05_01.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - request_payload=request_payload, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RunCommandResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + request_payload=request_payload, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RunCommandResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} # type: ignore def get_command_result( - self, resource_group_name, resource_name, command_id, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + command_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.RunCommandResult"] """Get command result. Get command result from previous runCommand invoke. @@ -1495,134 +1749,129 @@ def get_command_result( :type resource_name: str :param command_id: Id of the command request. :type command_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RunCommandResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.RunCommandResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RunCommandResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.RunCommandResult or None + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.RunCommandResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get_command_result.metadata['url'] + url = self.get_command_result.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'commandId': self._serialize.url("command_id", command_id, 'str') + 'commandId': self._serialize.url("command_id", command_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) + deserialized = self._deserialize('RunCommandResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_command_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'} + get_command_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'} # type: ignore def list_outbound_network_dependencies_endpoints( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of egress endpoints (network endpoints of all outbound - dependencies) in the specified managed cluster. + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OutboundEnvironmentEndpointCollection"] + """Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. - Gets a list of egress endpoints (network endpoints of all outbound - dependencies) in the specified managed cluster. The operation returns - properties of each egress endpoint. + Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + specified managed cluster. The operation returns properties of each egress endpoint. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OutboundEnvironmentEndpoint - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.OutboundEnvironmentEndpointPaged[~azure.mgmt.containerservice.v2021_05_01.models.OutboundEnvironmentEndpoint] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OutboundEnvironmentEndpointCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.OutboundEnvironmentEndpointCollection] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_outbound_network_dependencies_endpoints.metadata['url'] + url = self.list_outbound_network_dependencies_endpoints.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('OutboundEnvironmentEndpointCollection', 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) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - return response + return pipeline_response - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OutboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints'} + return ItemPaged( + get_next, extract_data + ) + list_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_operations.py old mode 100644 new mode 100755 index a0767bb9e9c..c26019e7667 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_operations.py @@ -1,102 +1,109 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class Operations(object): """Operations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" - - self.config = config + self._config = config def list( - self, custom_headers=None, raw=False, **operation_config): + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationListResult"] """Gets a list of compute operations. - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2021_05_01.models.OperationValue] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] - + url = self.list.metadata['url'] # type: ignore # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_endpoint_connections_operations.py old mode 100644 new mode 100755 index 45f43e5e70f..4cebbb525d1 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_endpoint_connections_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_endpoint_connections_operations.py @@ -1,185 +1,187 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class PrivateEndpointConnectionsOperations(object): """PrivateEndpointConnectionsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" - - self.config = config + self._config = config def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private endpoint connections in the specified managed - cluster. + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnectionListResult" + """Gets a list of private endpoint connections in the specified managed cluster. - Gets a list of private endpoint connections in the specified managed - cluster. The operation returns properties of each private endpoint - connection. + Gets a list of private endpoint connections in the specified managed cluster. The operation + returns properties of each private endpoint connection. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnectionListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnectionListResult + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionListResult', response) + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} # type: ignore def get( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" """Gets the private endpoint connection. - Gets the details of the private endpoint connection by managed cluster - and resource group. + Gets the details of the private endpoint connection by managed cluster and resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore def update( - self, resource_group_name, resource_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" """Updates a private endpoint connection. Updates a private endpoint connection in the specified managed cluster. @@ -188,161 +190,177 @@ def update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Update a private endpoint connection operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError """ - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.update.metadata['url'] + url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore def _delete_initial( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes a private endpoint connection. - Deletes the private endpoint connection in the specified managed - cluster. + Deletes the private endpoint connection in the specified managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_link_resources_operations.py old mode 100644 new mode 100755 index e4aeb6ac4bf..09f87df3e66 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_link_resources_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_link_resources_operations.py @@ -1,106 +1,107 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class PrivateLinkResourcesOperations(object): """PrivateLinkResourcesOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" - - self.config = config + self._config = config def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourcesListResult" """Gets a list of private link resources in the specified managed cluster. - Gets a list of private link resources in the specified managed cluster. - The operation returns properties of each private link resource. + Gets a list of private link resources in the specified managed cluster. The operation returns + properties of each private link resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResourcesListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesListResult', response) + deserialized = self._deserialize('PrivateLinkResourcesListResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_resolve_private_link_service_id_operations.py old mode 100644 new mode 100755 index ee7f4649e33..888fd53525f --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_resolve_private_link_service_id_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_resolve_private_link_service_id_operations.py @@ -1,46 +1,57 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class ResolvePrivateLinkServiceIdOperations(object): """ResolvePrivateLinkServiceIdOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" - - self.config = config + self._config = config def post( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.PrivateLinkResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResource" """Gets the private link service ID for the specified managed cluster. Gets the private link service ID the specified managed cluster. @@ -49,64 +60,56 @@ def post( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param parameters: Parameters (name, groupId) supplied in order to - resolve a private link service ID. - :type parameters: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :param parameters: Parameters (name, groupId) supplied in order to resolve a private link + service ID. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.post.metadata['url'] + url = self.post.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateLinkResource') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateLinkResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/version.py deleted file mode 100644 index 59e1cf48b15..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2021-05-01" -