CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-azure-mgmt-containerservice

Microsoft Azure Container Service Management Client Library for Python

Pending

Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

Overview
Eval results
Files

models.mddocs/

Core Models and Types

Essential data models representing AKS resources including cluster specifications, agent pool configurations, network profiles, and authentication settings. These models define the structure and properties of all Azure Container Service resources.

Core Resource Models

ManagedCluster

class ManagedCluster:
    """
    Managed Kubernetes cluster resource.
    
    Attributes:
    - location (str): Azure region location
    - kubernetes_version (str): Kubernetes version (e.g., "1.28.3")
    - dns_prefix (str): DNS name prefix for the cluster
    - fqdn (str): Fully qualified domain name of the cluster
    - agent_pool_profiles (List[ManagedClusterAgentPoolProfile]): Agent pool configurations
    - linux_profile (ContainerServiceLinuxProfile): Linux VM profile
    - windows_profile (ManagedClusterWindowsProfile): Windows VM profile
    - service_principal_profile (ManagedClusterServicePrincipalProfile): Service principal config
    - addon_profiles (Dict[str, ManagedClusterAddonProfile]): Cluster addons
    - node_resource_group (str): Resource group for cluster nodes
    - enable_rbac (bool): Enable Kubernetes RBAC
    - network_profile (ContainerServiceNetworkProfile): Network configuration
    - aad_profile (ManagedClusterAADProfile): Azure Active Directory integration
    - auto_upgrade_profile (ManagedClusterAutoUpgradeProfile): Auto-upgrade settings
    - identity (ManagedClusterIdentity): Managed identity configuration
    - provisioning_state (str): Current provisioning state
    - power_state (PowerState): Cluster power state
    - api_server_access_profile (ManagedClusterAPIServerAccessProfile): API server access
    - disk_encryption_set_id (str): Disk encryption set ID
    - enable_pod_security_policy (bool): Enable pod security policy
    - private_link_resources (List[PrivateLinkResource]): Private link resources
    - disable_local_accounts (bool): Disable local accounts
    - http_proxy_config (ManagedClusterHTTPProxyConfig): HTTP proxy configuration
    - security_profile (ManagedClusterSecurityProfile): Security settings
    - storage_profile (ManagedClusterStorageProfile): Storage configuration
    - ingress_profile (ManagedClusterIngressProfile): Ingress configuration
    """

AgentPool

class AgentPool:
    """
    Agent pool (node pool) resource.
    
    Attributes:
    - count (int): Number of nodes
    - vm_size (str): Virtual machine size (e.g., "Standard_D2s_v3")
    - os_disk_size_gb (int): OS disk size in GB
    - os_type (str): Operating system type ("Linux", "Windows")
    - max_pods (int): Maximum pods per node
    - type (str): Agent pool type ("VirtualMachineScaleSets", "AvailabilitySet")
    - mode (str): Agent pool mode ("System", "User")
    - orchestrator_version (str): Kubernetes version
    - provisioning_state (str): Provisioning state
    - power_state (PowerState): Power state
    - availability_zones (List[str]): Availability zones
    - enable_auto_scaling (bool): Enable auto-scaling
    - min_count (int): Minimum node count (auto-scaling)
    - max_count (int): Maximum node count (auto-scaling)
    - enable_node_public_ip (bool): Enable public IP on nodes
    - node_public_ip_prefix_id (str): Public IP prefix ID
    - scale_down_mode (str): Scale down mode ("Delete", "Deallocate")
    - spot_max_price (float): Maximum price for spot instances
    - tags (Dict[str, str]): Resource tags
    - node_labels (Dict[str, str]): Kubernetes node labels
    - node_taints (List[str]): Kubernetes node taints
    - proximity_placement_group_id (str): Proximity placement group ID
    - upgrade_settings (AgentPoolUpgradeSettings): Upgrade configuration
    - kubelet_config (KubeletConfig): Kubelet configuration
    - linux_os_config (LinuxOSConfig): Linux OS configuration
    - enable_encryption_at_host (bool): Enable encryption at host
    - enable_ultra_ssd (bool): Enable Ultra SSD
    - enable_fips (bool): Enable FIPS
    - gpu_instance_profile (str): GPU instance profile
    - creation_data (CreationData): Creation data for snapshots
    - capacity_reservation_group_id (str): Capacity reservation group ID
    - host_group_id (str): Dedicated host group ID
    - network_profile (AgentPoolNetworkProfile): Network profile
    - windows_profile (AgentPoolWindowsProfile): Windows profile
    """

Network Models

ContainerServiceNetworkProfile

class ContainerServiceNetworkProfile:
    """
    Network configuration for the cluster.
    
    Attributes:
    - network_plugin (str): Network plugin ("azure", "kubenet", "none")
    - network_policy (str): Network policy ("azure", "calico")
    - network_mode (str): Network mode ("transparent", "bridge")
    - pod_cidr (str): Pod CIDR range
    - service_cidr (str): Service CIDR range
    - dns_service_ip (str): DNS service IP address
    - outbound_type (str): Outbound connectivity type ("loadBalancer", "userDefinedRouting")
    - load_balancer_sku (str): Load balancer SKU ("basic", "standard")
    - load_balancer_profile (ManagedClusterLoadBalancerProfile): Load balancer configuration
    - nat_gateway_profile (ManagedClusterNATGatewayProfile): NAT gateway configuration
    - pod_cidrs (List[str]): Pod CIDR ranges (dual-stack)
    - service_cidrs (List[str]): Service CIDR ranges (dual-stack)
    - ip_families (List[str]): IP families ("IPv4", "IPv6")
    - network_dataplane (str): Network dataplane ("azure", "cilium")
    - network_plugin_mode (str): Network plugin mode ("overlay")
    """

ManagedClusterLoadBalancerProfile

class ManagedClusterLoadBalancerProfile:
    """
    Load balancer configuration.
    
    Attributes:
    - managed_outbound_i_ps (ManagedClusterLoadBalancerProfileManagedOutboundIPs): Managed outbound IPs
    - outbound_ip_prefixes (ManagedClusterLoadBalancerProfileOutboundIPPrefixes): Outbound IP prefixes
    - outbound_i_ps (ManagedClusterLoadBalancerProfileOutboundIPs): Outbound IPs
    - effective_outbound_i_ps (List[ResourceReference]): Effective outbound IPs
    - allocated_outbound_ports (int): Allocated outbound ports
    - idle_timeout_in_minutes (int): Idle timeout in minutes
    - enable_multiple_standard_load_balancers (bool): Enable multiple standard load balancers
    - backend_pool_type (str): Backend pool type ("nodeIP", "nodeIPConfiguration")
    """

Identity and Security Models

ManagedClusterIdentity

class ManagedClusterIdentity:
    """
    Managed cluster identity configuration.
    
    Attributes:
    - type (str): Identity type ("SystemAssigned", "UserAssigned", "None")
    - principal_id (str): Principal ID (read-only)
    - tenant_id (str): Tenant ID (read-only)
    - user_assigned_identities (Dict[str, ManagedServiceIdentityUserAssignedIdentitiesValue]): User-assigned identities
    - delegated_resources (Dict[str, DelegatedResource]): Delegated resources
    """

ManagedClusterAADProfile

class ManagedClusterAADProfile:
    """
    Azure Active Directory integration profile.
    
    Attributes:
    - managed (bool): Enable Azure AD integration
    - enable_azure_rbac (bool): Enable Azure RBAC
    - admin_group_object_i_ds (List[str]): Admin group object IDs
    - client_app_id (str): Client application ID
    - server_app_id (str): Server application ID
    - server_app_secret (str): Server application secret
    - tenant_id (str): Tenant ID
    """

Configuration Models

KubeletConfig

class KubeletConfig:
    """
    Kubelet configuration for nodes.
    
    Attributes:
    - cpu_manager_policy (str): CPU manager policy
    - cpu_cfs_quota (bool): CPU CFS quota enabled
    - cpu_cfs_quota_period (str): CPU CFS quota period
    - image_gc_high_threshold (int): Image GC high threshold
    - image_gc_low_threshold (int): Image GC low threshold
    - topology_manager_policy (str): Topology manager policy
    - allowed_unsafe_sysctls (List[str]): Allowed unsafe sysctls
    - fail_swap_on (bool): Fail if swap is on
    - container_log_max_size_mb (int): Container log max size MB
    - container_log_max_files (int): Container log max files
    - pod_max_pids (int): Pod max PIDs
    """

LinuxOSConfig

class LinuxOSConfig:
    """
    Linux OS configuration for nodes.
    
    Attributes:
    - sysctls (SysctlConfig): Sysctl configuration
    - transparent_huge_page_enabled (str): Transparent huge page setting
    - transparent_huge_page_defrag (str): Transparent huge page defrag
    - swap_file_size_mb (int): Swap file size in MB
    """

Maintenance and Upgrade Models

MaintenanceConfiguration

class MaintenanceConfiguration:
    """
    Maintenance configuration for scheduled operations.
    
    Attributes:
    - time_in_week (List[TimeInWeek]): Weekly maintenance windows
    - not_allowed_time (List[TimeSpan]): Blocked time periods
    - maintenance_window (MaintenanceWindow): Maintenance window configuration
    """

AgentPoolUpgradeSettings

class AgentPoolUpgradeSettings:
    """
    Agent pool upgrade settings.
    
    Attributes:
    - max_surge (str): Maximum surge during upgrade
    - drain_timeout_in_minutes (int): Node drain timeout
    - node_soak_duration_in_minutes (int): Node soak duration
    """

Snapshot Models

Snapshot

class Snapshot:
    """
    Node pool snapshot for backup and restore.
    
    Attributes:
    - creation_data (CreationData): Creation data
    - snapshot_type (str): Snapshot type ("NodePool")
    - kubernetes_version (str): Kubernetes version
    - node_image_version (str): Node image version
    - vm_size (str): VM size
    - os_type (str): OS type
    - os_sku (str): OS SKU
    - enable_fips (bool): FIPS enabled
    """

Common Types

PowerState

class PowerState:
    """
    Power state of a resource.
    
    Attributes:
    - code (str): Power state code ("Running", "Stopped", "Stopping", "Starting")
    """

CreationData

class CreationData:
    """
    Creation data for snapshots and restores.
    
    Attributes:
    - source_resource_id (str): Source resource ID for snapshot creation
    """

PrivateEndpointConnectionListResult

class PrivateEndpointConnectionListResult:
    """
    List of private endpoint connections for a managed cluster.
    
    Attributes:
    - value (List[PrivateEndpointConnection]): List of private endpoint connections
    """

PrivateLinkResourcesListResult

class PrivateLinkResourcesListResult:
    """
    List of private link resources for a managed cluster.
    
    Attributes:
    - value (List[PrivateLinkResource]): List of private link resources
    """

OperationValue

class OperationValue:
    """
    Operation supported by the Container Service resource provider.
    
    Attributes:
    - name (str): Operation name
    - display (OperationValueDisplay): Operation display information
    - is_data_action (bool): Whether this is a data plane operation
    - origin (str): Operation origin
    """

TrustedAccessRole

class TrustedAccessRole:
    """
    Trusted access role that can be granted to external services.
    
    Attributes:
    - name (str): Role name
    - source_resource_type (str): Source resource type for the role
    - rules (List[TrustedAccessRoleRule]): List of role rules and permissions
    """

Azure SDK Common Types

LROPoller

class LROPoller:
    """
    Long-running operation poller for tracking async operations.
    
    Methods:
    - result(timeout=None): Wait for operation completion and return result
    - done(): Check if operation is complete
    - status(): Get current operation status
    - wait(timeout=None): Wait for operation completion
    """

ItemPaged

class ItemPaged:
    """
    Paginated result iterator for listing operations.
    
    Usage:
    - Iterate directly: for item in paged_result: ...
    - Get by page: for page in paged_result.by_page(): ...
    """

CredentialResults

class CredentialResults:
    """
    Container for cluster access credentials.
    
    Attributes:
    - kubeconfigs (List[CredentialResult]): Kubeconfig credentials
    """

CredentialResult

class CredentialResult:
    """
    Individual credential result.
    
    Attributes:
    - name (str): Credential name
    - value (bytes): Credential value (base64 encoded)
    """

Usage Examples

Creating a Basic Cluster

from azure.mgmt.containerservice.models import (
    ManagedCluster,
    ManagedClusterAgentPoolProfile,
    ContainerServiceLinuxProfile,
    ContainerServiceSshConfiguration,
    ContainerServiceSshPublicKey,
    ManagedClusterIdentity,
    ContainerServiceNetworkProfile
)

cluster = ManagedCluster(
    location="East US",
    kubernetes_version="1.28.3",
    dns_prefix="my-cluster",
    agent_pool_profiles=[
        ManagedClusterAgentPoolProfile(
            name="system",
            count=3,
            vm_size="Standard_D2s_v3",
            os_type="Linux",
            mode="System"
        )
    ],
    linux_profile=ContainerServiceLinuxProfile(
        admin_username="azureuser",
        ssh=ContainerServiceSshConfiguration(
            public_keys=[
                ContainerServiceSshPublicKey(key_data="ssh-rsa AAAA...")
            ]
        )
    ),
    identity=ManagedClusterIdentity(type="SystemAssigned"),
    network_profile=ContainerServiceNetworkProfile(
        network_plugin="azure",
        service_cidr="10.0.0.0/16",
        dns_service_ip="10.0.0.10"
    )
)

Install with Tessl CLI

npx tessl i tessl/pypi-azure-mgmt-containerservice

docs

agent-pools.md

index.md

machines.md

maintenance.md

managed-clusters.md

models.md

private-endpoints.md

snapshots.md

trusted-access.md

tile.json